Exception: VibeSort::ApiError

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

Overview

Custom error class for API-related errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response = nil) ⇒ ApiError

Initialize a new ApiError

Parameters:

  • message (String)

    Error message

  • response (Faraday::Response, nil) (defaults to: nil)

    HTTP response object



12
13
14
15
# File 'lib/vibe_sort/error.rb', line 12

def initialize(message, response = nil)
  super(message)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/vibe_sort/error.rb', line 6

def response
  @response
end