Exception: ApiError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/sqa/errors.rb

Overview

Raised when an external API returns an error response. Automatically logs the error using debug_me before raising.

Examples:

ApiError.raise("Rate limit exceeded")

Class Method Summary collapse

Class Method Details

.raise(why) ⇒ Object

Raises an ApiError with debug logging.

Parameters:

  • why (String)

    The error message from the API

Raises:

  • (ApiError)

    Always raises after logging



72
73
74
75
# File 'lib/sqa/errors.rb', line 72

def self.raise(why)
  debug_me {"API Error: #{why}"}
  super
end