Exception: Exa::Errors::APIStatusError

Inherits:
APIError
  • Object
show all
Defined in:
lib/exa/errors.rb

Instance Attribute Summary

Attributes inherited from Error

#body, #headers, #status, #url

Class Method Summary collapse

Methods inherited from Error

#initialize

Constructor Details

This class inherits a constructor from Exa::Errors::Error

Class Method Details

.raise!(url:, status:, headers:, body:) ⇒ Object



21
22
23
24
# File 'lib/exa/errors.rb', line 21

def self.raise!(url:, status:, headers:, body:)
  message = "Exa API responded with status #{status}"
  raise new(message, url: url, status: status, headers: headers, body: body)
end