Exception: RideBuilder::Affiliate::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ridebuilder/affiliate/error.rb

Overview

Every failure the SDK raises. retryable is false for input-validation and terminal 4xx errors, true for 5xx/429/network failures (surfaced only after retries are exhausted). Port of the Node RideBuilderError.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, retryable:, status: nil, error_code: nil) ⇒ Error

Returns a new instance of Error.



10
11
12
13
14
15
# File 'lib/ridebuilder/affiliate/error.rb', line 10

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

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



8
9
10
# File 'lib/ridebuilder/affiliate/error.rb', line 8

def error_code
  @error_code
end

#retryableObject (readonly)

Returns the value of attribute retryable.



8
9
10
# File 'lib/ridebuilder/affiliate/error.rb', line 8

def retryable
  @retryable
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/ridebuilder/affiliate/error.rb', line 8

def status
  @status
end