Exception: Zeridion::Flare::FlareError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/zeridion_flare/errors.rb

Overview

Base exception for all Flare API errors. Every other exception in this SDK inherits from FlareError, so a single rescue FlareError covers them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code:, code:, request_id:) ⇒ FlareError

Returns a new instance of FlareError.



10
11
12
13
14
15
# File 'lib/zeridion_flare/errors.rb', line 10

def initialize(message, status_code:, code:, request_id:)
  super(message)
  @status_code = status_code
  @code = code
  @request_id = request_id
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/zeridion_flare/errors.rb', line 8

def code
  @code
end

#request_idObject (readonly)

Returns the value of attribute request_id.



8
9
10
# File 'lib/zeridion_flare/errors.rb', line 8

def request_id
  @request_id
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



8
9
10
# File 'lib/zeridion_flare/errors.rb', line 8

def status_code
  @status_code
end