Sha256: dba04219be90f1125bc44fdfd141c6bcb4065c5758b25a9e2dc5a4aa523e53be

Contents?: true

Size: 394 Bytes

Versions: 3

Compression:

Stored size: 394 Bytes

Contents

module AndSon

  class RequestError < RuntimeError
    attr_reader :response

    def initialize(protocol_response)
      super(protocol_response.status.message)
      @response = protocol_response
    end
  end

  ClientError     = Class.new(RequestError)

  BadRequestError = Class.new(ClientError)
  NotFoundError   = Class.new(ClientError)

  ServerError     = Class.new(RequestError)

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
and-son-0.2.1 lib/and-son/exceptions.rb
and-son-0.1.1 lib/and-son/exceptions.rb
and-son-0.1.0 lib/and-son/exceptions.rb