class GOVUK::Client::Errors::HTTPError
Public Class Methods
new(restclient_exception)
click to toggle source
@api private
Calls superclass method
# File lib/govuk/client/errors.rb, line 41 def initialize(restclient_exception) super(restclient_exception.message) @wrapped_exception = restclient_exception end
Public Instance Methods
code()
click to toggle source
@return [Integer] The HTTP status code associated with this exception.
# File lib/govuk/client/errors.rb, line 47 def code @wrapped_exception.http_code end
response()
click to toggle source
@return [Response] The response that triggered this exception.
# File lib/govuk/client/errors.rb, line 52 def response @response ||= Response.new(code, @wrapped_exception.response) end