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.
-
#e_class ⇒ Object
readonly
Returns the value of attribute e_class.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(msg = nil, code = nil, url = nil, body = nil, e_class = "Scalyr::Common::Client::ServerError") ⇒ ServerError
constructor
A new instance of ServerError.
- #is_commonly_retried? ⇒ Boolean
Constructor Details
#initialize(msg = nil, code = nil, url = nil, body = nil, e_class = "Scalyr::Common::Client::ServerError") ⇒ ServerError
Returns a new instance of ServerError.
13 14 15 16 17 18 19 |
# File 'lib/scalyr/common/client.rb', line 13 def initialize(msg=nil, code=nil, url=nil, body=nil, e_class="Scalyr::Common::Client::ServerError") super(msg) @code = code.to_i @url = url @body = body @e_class = e_class end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/scalyr/common/client.rb', line 11 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
11 12 13 |
# File 'lib/scalyr/common/client.rb', line 11 def code @code end |
#e_class ⇒ Object (readonly)
Returns the value of attribute e_class.
11 12 13 |
# File 'lib/scalyr/common/client.rb', line 11 def e_class @e_class end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
11 12 13 |
# File 'lib/scalyr/common/client.rb', line 11 def url @url end |
Instance Method Details
#is_commonly_retried? ⇒ Boolean
21 22 23 |
# File 'lib/scalyr/common/client.rb', line 21 def is_commonly_retried? [503, 502, 409].include? @code end |