Exception: Bsdkrun::GraphQLError

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

Overview

A GraphQL request to a remote bsdkrund daemon failed — a transport failure, a non-JSON response, or a body["errors"] entry that was not an auth failure. Mirrors +web/src/lib/graphql.ts+'s GraphQLError.

Direct Known Subclasses

AuthError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = nil) ⇒ GraphQLError

Returns a new instance of GraphQLError.

Parameters:

  • message (String)
  • code (String, nil) (defaults to: nil)


62
63
64
65
# File 'lib/bsdkrun/errors.rb', line 62

def initialize(message, code = nil)
  super(message)
  @code = code
end

Instance Attribute Details

#codeString? (readonly)

Returns the error's extensions.code, when the daemon set one.

Returns:

  • (String, nil)

    the error's extensions.code, when the daemon set one.



58
59
60
# File 'lib/bsdkrun/errors.rb', line 58

def code
  @code
end