Exception: JsonApiClient::Errors::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/json_api_client/errors.rb

Direct Known Subclasses

ClientError, ConnectionError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, msg = nil) ⇒ ApiError

Returns a new instance of ApiError.



8
9
10
11
12
13
14
# File 'lib/json_api_client/errors.rb', line 8

def initialize(env, msg = nil)
  @env = env
  # Try to fetch json_api errors from response
  msg = track_json_api_errors(msg)

  super msg
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



6
7
8
# File 'lib/json_api_client/errors.rb', line 6

def env
  @env
end