Class: GraphqlDevise::DetailedUserError

Inherits:
ExecutionError
  • Object
show all
Defined in:
lib/graphql_devise/errors/detailed_user_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(message, errors:) ⇒ DetailedUserError

Returns a new instance of DetailedUserError.



5
6
7
8
9
10
# File 'lib/graphql_devise/errors/detailed_user_error.rb', line 5

def initialize(message, errors:)
  @message = message
  @errors  = errors

  super(message)
end

Instance Method Details

#to_hObject



12
13
14
# File 'lib/graphql_devise/errors/detailed_user_error.rb', line 12

def to_h
  super.merge(extensions: { code: ERROR_CODES.fetch(:user_error), detailed_errors: @errors })
end