Quoting @schickling
If there’s an unexpected error in the client, the client should create a “error trace file” that will then be picked up by the CLI to prompt the user to report the detailed error.
(Input from @albertoperdomo via prisma/prisma-client-js#661)
What we think we would need to implement:
- dump errors during runtime into log files if
NODE_ENV != "production" or version includes dev (because CLI probably only exists there)
- (optional) automatic restart after a panic, could be dangerous if an infinite loop is hit
- truncate the file if based on filesize, i.e. 1MB or time, i.e. 1 day
- have the timestamp of the last occurrence
- debounce or throttle to avoid spamming the file system
- (optional, too complex?) de-duping occurrences of the same error
Quoting @schickling
(Input from @albertoperdomo via prisma/prisma-client-js#661)
What we think we would need to implement:
NODE_ENV != "production"or version includesdev(because CLI probably only exists there)