6 Exception andError Handling
.
- Application Error Handling
Application services shall handle exceptions through the supported error-handling mechanism and return controlled responses. User-facing messages shall not expose stack traces, database statements, internal paths, credentials, or infrastructure details. Provide a correlation identifier where supported so that authorized operators can locate the associated diagnostic record. - Diagnostic Information
Record the information needed for investigation in protected logs at the appropriate level. Review exception messages and nested causes for sensitive content before logging. Avoid exposing request bodies and headers by default. Invalid or failed requests shall not bypass transaction integrity or authorization checks.