Skip to content

HTMLKitErrorMiddleware

MatsMoll edited this page Nov 18, 2022 · 2 revisions

HTMLKitErrorMiddleware

// Can represent a path e.g a String or a Identifiable object / Some extensions only available in the Vapor code / Some extensions only available in the iOS code Captures all errors and transforms them into an internal server error.

public struct HTMLKitErrorMiddleware<F: HTMLPage, S: HTMLPage>: Middleware 

Inheritance

Middleware

Initializers

init(notFoundPage:serverErrorTemplate:ignorePath:)

Create a new ErrorMiddleware for the supplied pages.

public init(notFoundPage: F.Type, serverErrorTemplate: S.Type, ignorePath: String) 

init(ignorePath:)

Create a new ErrorMiddleware

public init(ignorePath: String) 

Methods

respond(to:chainingTo:)

See Middleware.respond

public func respond(to req: Request, chainingTo next: Responder) -> EventLoopFuture<Response>