Sha256: 7ae859befba51237edbf65ef54659f3f0c013a9985ec3e6a13ae387c16169da5

Contents?: true

Size: 414 Bytes

Versions: 19

Compression:

Stored size: 414 Bytes

Contents

# frozen_string_literal: true

module GraphqlRails
  # base class which is returned in case something bad happens. Contains all error rendering tructure
  class ExecutionError < GraphQL::ExecutionError
    def to_h
      super.except('locations').merge('type' => type, 'http_status_code' => http_status_code)
    end

    def type
      'system_error'
    end

    def http_status_code
      500
    end
  end
end

Version data entries

19 entries across 18 versions & 1 rubygems

Version Path
graphql_rails-0.6.0 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.5.2 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.5.1 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.5.0 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.4.3 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.4.2 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.4.1 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.4.0 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.3.3 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.3.2 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.3.1 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.3.0 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.2.4 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.2.3 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.2.2 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.2.1 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.2.0 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.1.0 lib/graphql_rails/errors/execution_error.rb
graphql_rails-0.1.0 lib/graphiti/errors/execution_error.rb