Exception: Mathpix::APIError

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

Overview

API error

Direct Known Subclasses

RateLimitError, ServerError

Instance Attribute Summary collapse

Attributes inherited from Error

#details

Instance Method Summary collapse

Constructor Details

#initialize(message, status: nil, details: {}) ⇒ APIError

Returns a new instance of APIError.



21
22
23
24
# File 'lib/mathpix/errors.rb', line 21

def initialize(message, status: nil, details: {})
  super(message, details: details)
  @status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



19
20
21
# File 'lib/mathpix/errors.rb', line 19

def status
  @status
end