Exception: Deepgram::HTTPError
- Defined in:
- lib/deepgram/exception.rb
Overview
Base class for HTTP errors returned by the Deepgram API.
Direct Known Subclasses
BadGateway, BadRequest, Forbidden, GatewayTimeout, InsufficientCredits, InternalServerError, NotFound, RateLimitExceeded, ServiceUnavailable, Unauthorized
Instance Attribute Summary
Attributes inherited from Exception
Instance Method Summary collapse
-
#headers ⇒ Hash
Returns the headers associated with the HTTP error.
-
#http_code ⇒ Integer
Returns the HTTP status code associated with the error.
Methods inherited from Exception
Constructor Details
This class inherits a constructor from Deepgram::Exception
Instance Method Details
#headers ⇒ Hash
Returns the headers associated with the HTTP error.
23 24 25 |
# File 'lib/deepgram/exception.rb', line 23 def headers error_data[:headers] end |
#http_code ⇒ Integer
Returns the HTTP status code associated with the error.
30 31 32 |
# File 'lib/deepgram/exception.rb', line 30 def http_code error_data[:code] end |