Sha256: cab2051f919f013b3f2a1d43ec6f91a0170c32ce469ca233ac6afa057b8b013e

Contents?: true

Size: 617 Bytes

Versions: 2

Compression:

Stored size: 617 Bytes

Contents

module Garb
  class Error < StandardError; end
  class MissingCertFileError < Error; end
  class AuthError < Error; end
  class ClientError < Error
    attr_reader :code, :message, :errors, :uri
    
    def initialize(uri, message, code = nil, errors = [])
      @code, @message, @errors, @uri = code, message, errors, uri
    end
    
    def to_s
      "#{code ? "[#{code}] #{message}" : message} : #{uri}"
    end
  end
  class BadRequestError < ClientError; end
  class InvalidCredentialsError < ClientError; end
  class InsufficientPermissionsError < ClientError; end
  class BackendError < ClientError; end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
garb-0.9.8 lib/garb/errors.rb
garb-0.9.7 lib/garb/errors.rb