6 Feb
2021
6 Feb
'21
2:34 p.m.
On Thu, Feb 4, 2021 at 9:06 AM Andrew Beverley <andy@andybev.com> wrote:
The idea is that you throw an exception anywhere:
error __x"Invalid email address: {email}", email => $email
Then it ends up in the fatal_handler to return the custom response
One question: This is all working great and I'm getting the correct HTTP responses, but (at least in development mode) I'm also getting a stack trace logged for every "error" call. Is there maybe a way to suppress the stack trace for expected exceptions? Ideally, I'd like to see stack traces for 500 errors, but not 4xx ones. Thanks, Paul