Exception: LDA::ServerError

Inherits:
Error
  • Object
show all
Defined in:
lib/lda_gov/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, body: nil) ⇒ ServerError

Returns a new instance of ServerError.



25
26
27
28
29
# File 'lib/lda_gov/error.rb', line 25

def initialize(message = nil, status: nil, body: nil)
  @status = status
  @body   = body
  super(message || "Server error HTTP #{status}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



23
24
25
# File 'lib/lda_gov/error.rb', line 23

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



23
24
25
# File 'lib/lda_gov/error.rb', line 23

def status
  @status
end