Ugly logs
When prisma logs an error, I seem to get the whole generated client bundle logged. Is there something I'm doing wrong here or an easy fix? I'
5 Replies
You opted for speed from this bot. Let's conjure up an answer right now!

If you're seeing huge, unreadable logs (sometimes including the whole generated client bundle or minified code) when Prisma logs an error, this is a known issue that has affected various users. By default, Prisma can output very verbose error messages, especially if not configured otherwise.
Solution:
You can control the verbosity of error logs by setting the
- If you still see large or minified logs after setting
Set
You can control the verbosity of error logs by setting the
errorFormat option when instantiating your PrismaClient. For the simplest output, use:
This will reduce the error output to just the essential message, making it much more readable and easier to handle in logs or error handlers. This approach is confirmed to work and is the recommended fix for the "gigantic output" problem in error logs Difficult to read error report, Gigantic output on error.
Note:- If you still see large or minified logs after setting
errorFormat: 'minimal', ensure you are using an up-to-date version of Prisma, as some older versions had bugs where this setting was ignored.
- In some environments (like Prisma Studio), there are still open issues with error display due to minified code, but for most CLI and server use cases, the above setting should help Error popups are unreadable in Studio because of minified sources.
Summary:Set
errorFormat: 'minimal' in your PrismaClient constructor to avoid ugly, verbose error logs. If issues persist, consider updating Prisma to the latest version.
🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.also raised this before, minimal does nothing.
only "fix" i have found is to wrap all code in a try catch, then look ONLY at error.message, not error
Ah cheers. weird one... haha