SiteErrorMiddleware
public final class SiteErrorMiddleware : AsyncMiddleware
Captures all errors and transforms them into an internal server error HTTP response.
-
Declaration
Swift
var isReleaseMode: Bool
-
handleError(req:
Asynchronouserror: ) Declaration
Swift
func handleError(req: Request, error: Error) async throws -> Response
-
Declaration
Swift
init(environment: Environment)
-
respond(to:
AsynchronouschainingTo: ) See
Middleware
.Declaration
Swift
public func respond(to request: Request, chainingTo next: AsyncResponder) async throws -> Response