Sha256: e0bb653a7ed1d5d27d9c9ae61ef906129086ed1d8d18c6786f0e14702d8a7fbd

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

module Afterpay
  class BaseError < StandardError
    attr_accessor :error_code

    def initialize(error_code)
      super
      @error_code = error_code
    end
  end

  class BadRequestError           < BaseError;     end

  class UnathorizedError          < BaseError;     end

  class PaymentRequiredError      < BaseError;     end

  class NotFoundError             < BaseError;     end

  class MethodNotAllowedError     < BaseError;     end

  class NotAcceptableError        < BaseError;     end

  class RequestTimeoutError       < BaseError;     end

  class ConflictError             < BaseError;     end

  class GoneError                 < BaseError;     end

  class PreconditionFailedError   < BaseError;     end

  class UnprocessableEntityError  < BaseError;     end

  class TooManyRequestsError      < BaseError;     end

  class InternalServerError       < BaseError;     end

  class ServiceUnavailableError   < BaseError;     end

  class GatewayTimeoutError       < BaseError;     end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
afterpay-0.6.0 lib/afterpay/errors.rb
afterpay-0.5.0 lib/afterpay/errors.rb
afterpay-0.4.0 lib/afterpay/errors.rb