public final class ErrorMiddleware: Middleware
Captures all errors and transforms them into an internal server error HTTP response.
Middlewareis placed between the server and your router. It is capable of mutating both incoming requests and outgoing responses.
Middlewarecan choose to pass requests on to the next
Middlewarein a chain, or they can short circuit and return a custom
public static func `default`(environment: Environment) -> ErrorMiddleware
Create a default
ErrorMiddleware. Logs errors to a
Logger based on
Response based on conformance to
The environment to respect when presenting errors.