Class: GraphQL::Client::ClientError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ClientError

Returns a new instance of ClientError.



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

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/graphql_client/error.rb', line 11

def response
  @response
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/graphql_client/error.rb', line 17

def message
  "#{response.code} #{response.message}"
end