Class: GraphqlDevise::DetailedUserError
- Inherits:
-
ExecutionError
- Object
- GraphQL::ExecutionError
- ExecutionError
- GraphqlDevise::DetailedUserError
- Defined in:
- lib/graphql_devise/errors/detailed_user_error.rb
Instance Method Summary collapse
-
#initialize(message, errors:) ⇒ DetailedUserError
constructor
A new instance of DetailedUserError.
- #to_h ⇒ Object
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(, errors:) @message = @errors = errors super() end |
Instance Method Details
#to_h ⇒ Object
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 |