Exception: Rockbox::GraphQLError
- Defined in:
- lib/rockbox/errors.rb
Overview
Raised when rockboxd returns a GraphQL ‘errors` payload.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(errors) ⇒ GraphQLError
constructor
A new instance of GraphQLError.
Constructor Details
#initialize(errors) ⇒ GraphQLError
Returns a new instance of GraphQLError.
28 29 30 31 |
# File 'lib/rockbox/errors.rb', line 28 def initialize(errors) @errors = Array(errors) super(@errors.map { |e| e[:message] || e["message"] }.compact.join("; ")) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
26 27 28 |
# File 'lib/rockbox/errors.rb', line 26 def errors @errors end |