Exception: Scalyr::Common::Client::ServerError
- Inherits:
-
StandardError
- Object
- StandardError
- Scalyr::Common::Client::ServerError
- Defined in:
- lib/scalyr/common/client.rb
Overview
An exception representing a Scalyr server-side error that occurs during upload attempt
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(msg = nil, code = nil, url = nil, body = nil) ⇒ ServerError
constructor
A new instance of ServerError.
- #is_commonly_retried? ⇒ Boolean
Constructor Details
#initialize(msg = nil, code = nil, url = nil, body = nil) ⇒ ServerError
10 11 12 13 14 15 |
# File 'lib/scalyr/common/client.rb', line 10 def initialize(msg=nil, code=nil, url=nil, body=nil) super(msg) @code = code.to_i @url = url @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
8 9 10 |
# File 'lib/scalyr/common/client.rb', line 8 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/scalyr/common/client.rb', line 8 def code @code end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/scalyr/common/client.rb', line 8 def url @url end |
Instance Method Details
#is_commonly_retried? ⇒ Boolean
17 18 19 |
# File 'lib/scalyr/common/client.rb', line 17 def is_commonly_retried? [503, 502, 409].include? @code end |