Sha256: 2f333bac8698594e52af96143dab2215aebcc7994080ff33fd2816725373c219

Contents?: true

Size: 1.11 KB

Versions: 12

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

module ErpIntegration
  # The `ErpIntegration::Error` is the default error class for any exception raised
  # on purpose by this gem.
  class Error < StandardError; end

  # The `ErpIntegration::BadConfiguration` is raised whenever the newly provided
  # configuration is not a valid configuration object.
  class BadConfiguration < Error
    def initialize
      super(
        '[ERP Integration] The provided configuration object is not a ' \
          'ErpIntegration::Configuration instance. Please provide a '  \
          'ErpIntegration::Configuration instance when overriding the configuration directly.'
      )
    end
  end

  class HttpError < Faraday::Error
    class BadRequest < HttpError; end
    class AuthorizationRequired < HttpError; end
    class PaymentRequired < HttpError; end
    class Forbidden < HttpError; end
    class NotFound < HttpError; end
    class MethodNotAllowed < HttpError; end
    class NotAccepted < HttpError; end
    class UnprocessableEntity < HttpError; end
    class TooManyRequests < HttpError; end
    class InternalServerError < HttpError; end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
erp_integration-0.5.5 lib/erp_integration/errors.rb
erp_integration-0.5.4 lib/erp_integration/errors.rb
erp_integration-0.5.3 lib/erp_integration/errors.rb
erp_integration-0.5.2 lib/erp_integration/errors.rb
erp_integration-0.5.1 lib/erp_integration/errors.rb
erp_integration-0.5.0 lib/erp_integration/errors.rb
erp_integration-0.4.0 lib/erp_integration/errors.rb
erp_integration-0.3.3 lib/erp_integration/errors.rb
erp_integration-0.3.2 lib/erp_integration/errors.rb
erp_integration-0.3.1 lib/erp_integration/errors.rb
erp_integration-0.3.0 lib/erp_integration/errors.rb
erp_integration-0.2.0 lib/erp_integration/errors.rb