Exception: Deepgram::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/deepgram/exception.rb

Overview

Base class for all Deepgram API exceptions.

Direct Known Subclasses

HTTPError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, error_data = {}) ⇒ Exception

Initializes a new instance of the Exception class.

Parameters:

  • message (String)

    The error message.

  • error_data (Hash) (defaults to: {})

    Additional error data (e.g., headers, error codes).



12
13
14
15
# File 'lib/deepgram/exception.rb', line 12

def initialize(message, error_data = {})
  super(message)
  @error_data = error_data
end

Instance Attribute Details

#error_dataObject (readonly)

Returns the value of attribute error_data.



6
7
8
# File 'lib/deepgram/exception.rb', line 6

def error_data
  @error_data
end