Exception: Rager::Errors::HttpError

Inherits:
Rager::Error
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/rager/errors/http_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(adapter, url, status, body: nil, details: nil) ⇒ HttpError



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rager/errors/http_error.rb', line 12

def initialize(adapter, url, status, body: nil, details: nil)
  error_data = {
    type: "http",
    adapter: adapter.class.name,
    url: url,
    status: status,
    body: body,
    details: details
  }

  super(error_data.to_json)
end