Exception: BibleQL::APIError

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

Direct Known Subclasses

AuthenticationError, RateLimitError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, body: nil) ⇒ APIError

Returns a new instance of APIError.



15
16
17
18
19
# File 'lib/bibleql/errors.rb', line 15

def initialize(message = nil, status: nil, body: nil)
  @status = status
  @body = body
  super(message)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



13
14
15
# File 'lib/bibleql/errors.rb', line 13

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



13
14
15
# File 'lib/bibleql/errors.rb', line 13

def status
  @status
end