Class: Parse::Error::ServiceUnavailableError
- Inherits:
-
Error
- Object
- Error
- Parse::Error::ServiceUnavailableError
- Defined in:
- lib/parse/client.rb
Overview
An error when a Parse server (or a gateway in front of it) responds with HTTP 500, 502, 503, or 504.
Instance Attribute Summary collapse
-
#response ⇒ Parse::Response?
readonly
The response that raised the error.
Instance Method Summary collapse
-
#http_status ⇒ Integer?
The HTTP status of the response, when known.
-
#initialize(message = nil) ⇒ ServiceUnavailableError
constructor
A new instance of ServiceUnavailableError.
Constructor Details
#initialize(message = nil) ⇒ ServiceUnavailableError
Returns a new instance of ServiceUnavailableError.
62 63 64 65 |
# File 'lib/parse/client.rb', line 62 def initialize( = nil) @response = if .is_a?(Parse::Response) super end |
Instance Attribute Details
#response ⇒ Parse::Response? (readonly)
Returns the response that raised the error.
60 61 62 |
# File 'lib/parse/client.rb', line 60 def response @response end |
Instance Method Details
#http_status ⇒ Integer?
Returns the HTTP status of the response, when known.
68 69 70 |
# File 'lib/parse/client.rb', line 68 def http_status @response&.http_status&.to_i end |