Exception: OrcaApi::HttpError

Inherits:
Error
  • Object
show all
Defined in:
lib/orca_api/error.rb

Overview

HTTP通信時に発生したエラーを表現するクラス

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HttpError

Returns a new instance of HttpError



12
13
14
15
# File 'lib/orca_api/error.rb', line 12

def initialize(response)
  @response = response
  super("#{response.message} (#{response.code})")
end

Constructor Details

#initialize(response) ⇒ HttpError

Returns a new instance of HttpError



12
13
14
15
# File 'lib/orca_api/error.rb', line 12

def initialize(response)
  @response = response
  super("#{response.message} (#{response.code})")
end

Instance Attribute Details

#responseObject (readonly)

エラーが発生したHTTP通信のNet::HTTPResponseオブジェクト



10
11
12
# File 'lib/orca_api/error.rb', line 10

def response
  @response
end