Sha256: a5310407dc641c9257e3d8de71dcc1fdeaf4d1c651a5fe91e18124cb608e84a8

Contents?: true

Size: 817 Bytes

Versions: 4

Compression:

Stored size: 817 Bytes

Contents

# TODO: Add more exceptions here

module Trumpet
  
  # Exception raised when the connection to the server fails
  class ServerConnectionError < StandardError; end
  
  # A generic exception to use until we have more specific exceptions
  # for everything
  class TrumpetError < StandardError; end
  
  # HTTP 400 Error
  class BadRequest < StandardError; end
  
  # HTTP 401 Error
  class Unauthorized < StandardError; end
  
  # HTTP 403 Error
  class Forbidden < StandardError; end
  
  # HTTP 404 Error
  class NotFound  < StandardError; end
  
  # HTTP 405 Error
  class MethodNotAllowed  < StandardError; end
  
  # HTTP 409 Error
  class Conflict < StandardError; end
  
  # HTTP 500 Error
  class InternalServerError  < StandardError; end
  
  # HTTP 501 Error
  class NotImplemented  < StandardError; end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trumpet-trumpet-0.0.12 lib/trumpet/exceptions.rb
trumpet-trumpet-0.1.0 lib/trumpet/exceptions.rb
trumpet-trumpet-0.1.1 lib/trumpet/exceptions.rb
trumpet-trumpet-0.1.2 lib/trumpet/exceptions.rb