Exception: CardDB::GraphQLError

Inherits:
Error
  • Object
show all
Defined in:
lib/carddb/errors.rb

Overview

Raised for GraphQL-level errors

Instance Attribute Summary collapse

Attributes inherited from Error

#response

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, errors: [], response: nil) ⇒ GraphQLError

Returns a new instance of GraphQLError.



63
64
65
66
# File 'lib/carddb/errors.rb', line 63

def initialize(message = nil, errors: [], response: nil)
  @errors = errors
  super(message, response: response)
end

Instance Attribute Details

#errorsArray<Hash> (readonly)

Returns List of GraphQL errors.

Returns:

  • (Array<Hash>)

    List of GraphQL errors



61
62
63
# File 'lib/carddb/errors.rb', line 61

def errors
  @errors
end