Exception: Deepgram::HTTPError

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

Overview

Base class for HTTP errors returned by the Deepgram API.

Instance Attribute Summary

Attributes inherited from Exception

#error_data

Instance Method Summary collapse

Methods inherited from Exception

#initialize

Constructor Details

This class inherits a constructor from Deepgram::Exception

Instance Method Details

#headersHash

Returns the headers associated with the HTTP error.

Returns:

  • (Hash)

    The headers.



23
24
25
# File 'lib/deepgram/exception.rb', line 23

def headers
  error_data[:headers]
end

#http_codeInteger

Returns the HTTP status code associated with the error.

Returns:

  • (Integer)

    The HTTP status code.



30
31
32
# File 'lib/deepgram/exception.rb', line 30

def http_code
  error_data[:code]
end