class

Sonarr::ApiError

Inherits Sonarr::Error < Exception < Reference < Object

Raised when the Sonarr API responds with a non-2xx HTTP status.

Carries the HTTP status_code and the raw response body (often a JSON error payload) so callers can inspect what went wrong. The client wraps crest's own Crest::RequestFailed into this type so consumers never need to know the underlying HTTP shard.

Constructors

from_request_failed(ex : Crest::RequestFailed) : ApiError

Wraps the response of a crest failure (raised when handle_errors is on) into a typed ApiError.

Source
from_response(response : Crest::Response) : ApiError

Builds an ApiError from a crest response.

Source
new(status_code : Int32, body : String, message : String | Nil = nil)
Source

Instance methods

body
Source
status_code
Source