Class: GraphqlRails::SystemError

Inherits:
ExecutionError
  • Object
show all
Defined in:
lib/graphql_rails/errors/system_error.rb

Overview

Base class which is returned in case something bad happens. Contains all error rendering structure

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ExecutionError

#extra_graphql_data

Constructor Details

#initialize(original_error) ⇒ SystemError

Returns a new instance of SystemError.



10
11
12
13
14
# File 'lib/graphql_rails/errors/system_error.rb', line 10

def initialize(original_error)
  super(original_error.message)

  @original_error = original_error
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



8
9
10
# File 'lib/graphql_rails/errors/system_error.rb', line 8

def original_error
  @original_error
end

Instance Method Details

#to_hObject



16
17
18
# File 'lib/graphql_rails/errors/system_error.rb', line 16

def to_h
  super.except('locations')
end

#typeObject



20
21
22
# File 'lib/graphql_rails/errors/system_error.rb', line 20

def type
  'system_error'
end