ServerError
An error thrown by a server handling an OpenAPI operation.
ServerError.swift:19struct ServerError
See also
struct ClientError
An error thrown by a client performing an OpenAPI operation.
struct UndocumentedPayload
A payload value used by undocumented operation responses.
Citizens in OpenAPIRuntime
Conformances
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Error
A type representing an error value that can be thrown.
protocol Escapable
protocol LocalizedError
Describes an error that provides localized messages describing why an error occurred and provides more information about the error.
protocol Sendable
Type members
init(operationID: String, request: HTTPRequest, requestBody: HTTPBody?, requestMetadata: ServerRequestMetadata, operationInput: (any Sendable)?, operationOutput: (any Sendable)?, causeDescription: String, underlyingError: any Error
) Creates a new error.
Instance members
var causeDescription: String
A user-facing description of what caused the underlying error to be thrown.
var description: String
A human-readable description of the server error.
var errorDescription: String?
A localized description of the server error.
var operationID: String
Identifier of the operation that threw the error.
var operationInput: (any Sendable)?
An operation-specific Input value.
var operationOutput: (any Sendable)?
An operation-specific Output value.
var request: HTTPRequest
The HTTP request provided to the server.
var requestBody: HTTPBody?
The HTTP request body provided to the server.
var requestMetadata: ServerRequestMetadata
The request metadata extracted by the server.
var underlyingError: any Error
The underlying error that caused the operation to fail.
Instance features
var failureReason: String?
var helpAnchor: String?
var localizedDescription: String
Retrieve the localized description for this error.
var recoverySuggestion: String?