Exception: DeepL::Exceptions::ServerError
- Inherits:
-
RequestError
- Object
- StandardError
- Error
- RequestError
- DeepL::Exceptions::ServerError
- Defined in:
- lib/deepl/exceptions/server_error.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from RequestError
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(response, request = nil, should_retry: true) ⇒ ServerError
constructor
A new instance of ServerError.
- #should_retry? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(response, request = nil, should_retry: true) ⇒ ServerError
Returns a new instance of ServerError.
10 11 12 13 |
# File 'lib/deepl/exceptions/server_error.rb', line 10 def initialize(response, request = nil, should_retry: true) super(response, request) @should_retry = should_retry end |
Instance Method Details
#should_retry? ⇒ Boolean
20 21 22 |
# File 'lib/deepl/exceptions/server_error.rb', line 20 def should_retry? @should_retry end |
#to_s ⇒ Object
15 16 17 18 |
# File 'lib/deepl/exceptions/server_error.rb', line 15 def to_s ('An internal server error occured. ' \ 'Try again after waiting a short period.') end |