class
JSONAPI::Error
- JSONAPI::Error
- Exception
- Reference
- Object
Overview
Base exception carrying structured JSON:API errors and an HTTP status code.
Direct Known Subclasses
- JSONAPI::DeserializationError
- JSONAPI::MediaTypeError
- JSONAPI::NotAcceptableError
- JSONAPI::QueryParamError
Defined in:
jsonapi/error.crConstructors
- .new(errors : Array(ErrorObject), http_status : HTTP::Status = HTTP::Status::BAD_REQUEST, message : String | Nil = nil)
- .new(error : ErrorObject, http_status : HTTP::Status = HTTP::Status::BAD_REQUEST)
Instance Method Summary
- #errors : Array(ErrorObject)
- #http_status : HTTP::Status
- #to_document(include_version : Bool = true) : ErrorDocument
Constructor Detail
def self.new(errors : Array(ErrorObject), http_status : HTTP::Status = HTTP::Status::BAD_REQUEST, message : String | Nil = nil)
#