Application Security · Flashcard
How should an application handle an exception it did not anticipate?
Why this is the answer
A handler returning controlled output prevents crashes and information leaks (CWE-391) — the framework default exposes stack traces, writing the exception to the response leaks internals to the user, and blind retries can loop forever or mask a real fault.
Read more in the docs