Protocol
AbortError
Errors conforming to this protocol will always be displayed by Vapor to the end-user (even in production mode where most errors are silenced).
protocol AbortError : Error
Overview
extension MyError: AbortError { ... }
throw MyError(...) // Can now result in non-500 error.
See Abort for a default implementation of this protocol.
throw Abort(.badRequest, reason: "Something's not quite right...")
Topics
Instance Properties
headersOptionalHTTPHeadersto add to the error response.identifierSeeDebuggableError.reasonThe reason for this error.statusThe HTTP status code this error will return.
Relationships
Inherits From
Swift.ErrorSwift.SendableSwift.SendableMetatype