Skip to content

Class

ErrorMiddleware

Captures all errors and transforms them into an internal server error HTTP response.
final class ErrorMiddleware

Topics

Initializers

Instance Methods

Type Methods

  • default(environment:)
    Create a default ErrorMiddleware. Logs errors to a Logger based on Environment and converts Error to Response based on conformance to AbortError and Debuggable.

Relationships

Conforms To

  • Middleware
  • Swift.Sendable
  • Swift.SendableMetatype