Sha256: 6f9e079cc9c204141f4e171f98a31a726de34e7ee3361ffd0110a9e9562a087b

Contents?: true

Size: 505 Bytes

Versions: 19

Compression:

Stored size: 505 Bytes

Contents

module Checkr
  class CheckrError < StandardError
    attr_reader :message
    attr_reader :http_status
    attr_reader :http_body
    attr_reader :json_body

    def initialize(message=nil, http_status=nil, http_body=nil, json_body=nil)
      @message = message
      @http_status = http_status
      @http_body = http_body
      @json_body = json_body
    end

    def to_s
      status_string = @http_status.nil? ? "" : "(Status #{@http_status}) "
      "#{status_string}#{@message}"
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
checkr-official-1.8.0 lib/checkr/errors/checkr_error.rb
checkr-official-1.7.1 lib/checkr/errors/checkr_error.rb
checkr-official-1.7 lib/checkr/errors/checkr_error.rb
checkr-official-1.6 lib/checkr/errors/checkr_error.rb
checkr-official-1.5.4 lib/checkr/errors/checkr_error.rb
checkr-official-1.5.3 lib/checkr/errors/checkr_error.rb
checkr-official-1.5.2 lib/checkr/errors/checkr_error.rb
checkr-official-1.5.1 lib/checkr/errors/checkr_error.rb
checkr-official-1.5.0 lib/checkr/errors/checkr_error.rb
checkr-official-1.4.0 lib/checkr/errors/checkr_error.rb
checkr-official-1.3.1 lib/checkr/errors/checkr_error.rb
checkr-official-1.2.1 lib/checkr/errors/checkr_error.rb
checkr-official-1.2.0 lib/checkr/errors/checkr_error.rb
checkr-official-1.1.2 lib/checkr/errors/checkr_error.rb
checkr-official-1.1.1 lib/checkr/errors/checkr_error.rb
checkr-official-1.1.0 lib/checkr/errors/checkr_error.rb
checkr-official-1.0.2 lib/checkr/errors/checkr_error.rb
checkr-official-1.0.1 lib/checkr/errors/checkr_error.rb
checkr-official-1.0.0 lib/checkr/errors/checkr_error.rb