module

Via::HTTP::ErrorPages

Constants

DEFINITIONS = {::HTTP::Status::BAD_REQUEST => Definition.new("Bad Request", "The request could not be understood."), ::HTTP::Status::FORBIDDEN => Definition.new("Forbidden", "Access to this resource is forbidden."), ::HTTP::Status::NOT_FOUND => Definition.new("Not Found", "The requested resource was not found."), ::HTTP::Status::METHOD_NOT_ALLOWED => Definition.new("Method Not Allowed", "This resource does not support the request method."), ::HTTP::Status::RANGE_NOT_SATISFIABLE => Definition.new("Range Not Satisfiable", "The requested byte range cannot be served."), ::HTTP::Status::BAD_GATEWAY => Definition.new("Bad Gateway", "The upstream server could not be reached."), ::HTTP::Status::SERVICE_UNAVAILABLE => Definition.new("Service Unavailable", "The service is temporarily unavailable."), ::HTTP::Status::GATEWAY_TIMEOUT => Definition.new("Gateway Timeout", "The upstream server did not respond in time.")}

Class methods

body(status : ::HTTP::Status, request_id : String) : String
Source
diagnostic(source : String, message : String, request_id : String) : String
Source
render(response : ::HTTP::Server::Response, status : ::HTTP::Status, request_id : String, *, head : Bool = false, additional_headers : ::HTTP::Headers | Nil = nil) : Nil
Source

Nested types