Exception: Scalyr::Common::Client::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/scalyr/common/client.rb

Overview


An exception representing failure of the http client to upload data to Scalyr (in contrast to server-side errors where the POST api succeeds, but the Scalyr server then responds with an error)


Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, url = nil) ⇒ ClientError

Returns a new instance of ClientError.



36
37
38
39
40
41
# File 'lib/scalyr/common/client.rb', line 36

def initialize(msg=nil, url=nil)
  super(msg)
  @code = nil  # currently no way to get this from Net::HTTP::Persistent::Error
  @url = url
  @body = nil
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



34
35
36
# File 'lib/scalyr/common/client.rb', line 34

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



34
35
36
# File 'lib/scalyr/common/client.rb', line 34

def code
  @code
end

#urlObject (readonly)

Returns the value of attribute url.



34
35
36
# File 'lib/scalyr/common/client.rb', line 34

def url
  @url
end

Instance Method Details

#is_commonly_retried?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/scalyr/common/client.rb', line 43

def is_commonly_retried?
  false
end