ApiAwareExceptionInterface defines an isSafe() method.
These exceptions are safe to expose to end-users (e.g., in an API response).
ValidationMaatifyExceptionBusinessRuleMaatifyExceptionAuthenticationMaatifyExceptionAuthorizationMaatifyExceptionRateLimitMaatifyExceptionConflictMaatifyExceptionNotFoundMaatifyExceptionUnsupportedMaatifyException
Warning: Do not include sensitive data (tokens, internal IDs, passwords) in the exception message, even for safe exceptions.
These exceptions must never be exposed to end-users. They contain internal details (stack traces, SQL errors, file paths).
SystemMaatifyExceptionDatabaseConnectionMaatifyExceptionMaatifyException(Base class default)
It is the responsibility of the exception handler (middleware, framework) to check isSafe() before rendering a response. If isSafe() is false, the handler should log the error and return a generic "Internal Server Error" message.