class Kaseya::BMS::BMSError

Attributes

description[R]
error[R]
response[R]

Public Class Methods

new(response) click to toggle source
Calls superclass method
# File lib/kaseya/bms/exceptions.rb, line 5
def initialize(response)
  @response = response
  if @response&.body
    @error = @response.body["error"]
    @description = @response.body["error_description"]
  end

  super("#{@error || 'Error'}: #{@description || 'Unknown API error'}")
end