Exception: Oss::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/oss/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(err_attrs, err_msg) ⇒ ResponseError

Returns a new instance of ResponseError.



7
8
9
10
11
12
13
14
15
16
# File 'lib/oss/error.rb', line 7

def initialize(err_attrs, err_msg)
  @error_code    = err_attrs[:code]
  @error_message = err_attrs[:message]
  @http_status   = err_attrs[:http_status]
  @header        = err_attrs[:header]
  @request_id    = err_attrs[:request_id]
  @host_id       = err_attrs[:host_id]

  super err_msg
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



5
6
7
# File 'lib/oss/error.rb', line 5

def error_code
  @error_code
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



5
6
7
# File 'lib/oss/error.rb', line 5

def error_message
  @error_message
end

#headerObject (readonly)

Returns the value of attribute header.



5
6
7
# File 'lib/oss/error.rb', line 5

def header
  @header
end

#host_idObject (readonly)

Returns the value of attribute host_id.



5
6
7
# File 'lib/oss/error.rb', line 5

def host_id
  @host_id
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



5
6
7
# File 'lib/oss/error.rb', line 5

def http_status
  @http_status
end

#request_idObject (readonly)

Returns the value of attribute request_id.



5
6
7
# File 'lib/oss/error.rb', line 5

def request_id
  @request_id
end