ErrorMiddleware runs after all handlers have been executed, and it handles any errors returned from the handlers. It will return an internal server error with a predefined message if the last error type is not public. Otherwise, it will display the last error message it received, and the associated HTTP status code.

ErrorMiddleware is referenced in 1 repository