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, e_class = "Scalyr::Common::Client::ClientError") ⇒ ClientError

Returns a new instance of ClientError.



40
41
42
43
44
45
46
# File 'lib/scalyr/common/client.rb', line 40

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#e_classObject (readonly)

Returns the value of attribute e_class.



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

def e_class
  @e_class
end

#urlObject (readonly)

Returns the value of attribute url.



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

def url
  @url
end

Instance Method Details

#is_commonly_retried?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/scalyr/common/client.rb', line 48

def is_commonly_retried?
  false
end