Class
ErrorMiddleware
Captures all errors and transforms them into an internal server error HTTP response.
final class ErrorMiddleware
Topics
Initializers
init(_:)Create a newErrorMiddleware.
Instance Methods
respond(to:chainingTo:)Called with eachRequestthat passes through this middleware.
Type Methods
default(environment:)Create a defaultErrorMiddleware. Logs errors to aLoggerbased onEnvironmentand convertsErrortoResponsebased on conformance toAbortErrorandDebuggable.
Relationships
Conforms To
MiddlewareSwift.SendableSwift.SendableMetatype