Class: Notion::Errors::HttpError

Inherits:
Faraday::Error
  • Object
show all
Defined in:
lib/notion/errors/http_error.rb

Overview

Collect all http errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, response = nil) ⇒ HttpError

Returns a new instance of HttpError.



9
10
11
12
# File 'lib/notion/errors/http_error.rb', line 9

def initialize(code, message, response = nil)
  super("Code: #{code}, Message: \"#{message}\"")
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/notion/errors/http_error.rb', line 7

def response
  @response
end