Exception: Tinybucket::Error::ServiceError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/tinybucket/error/service_error.rb

Direct Known Subclasses

Conflict, NotFound

Instance Attribute Summary collapse

Attributes inherited from BaseError

#response_headers, #response_message

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ ServiceError

Returns a new instance of ServiceError.



9
10
11
12
# File 'lib/tinybucket/error/service_error.rb', line 9

def initialize(env)
  super generate_message(env)
  @http_headers = env[:response_headers]
end

Instance Attribute Details

#http_headersObject

Returns the value of attribute http_headers.



6
7
8
# File 'lib/tinybucket/error/service_error.rb', line 6

def http_headers
  @http_headers
end

#http_methodObject (readonly)

Returns the value of attribute http_method.



7
8
9
# File 'lib/tinybucket/error/service_error.rb', line 7

def http_method
  @http_method
end

#request_urlObject (readonly)

Returns the value of attribute request_url.



7
8
9
# File 'lib/tinybucket/error/service_error.rb', line 7

def request_url
  @request_url
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.



7
8
9
# File 'lib/tinybucket/error/service_error.rb', line 7

def response_body
  @response_body
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



7
8
9
# File 'lib/tinybucket/error/service_error.rb', line 7

def status_code
  @status_code
end