class Yoti::RequestError

Raises exceptions related to API requests

Attributes

response[R]

Public Class Methods

new(message, response = nil) click to toggle source
Calls superclass method
# File lib/yoti/errors.rb, line 9
def initialize(message, response = nil)
  super(message)
  @response = response
end

Public Instance Methods

message() click to toggle source
Calls superclass method
# File lib/yoti/errors.rb, line 14
def message
  return super if @response.nil? || @response.body.empty?

  "#{super}: #{@response.body}"
end