Sha256: c58f04eb690a86a343ba6618e331603c6e75737221206d1650641c9b7320df65

Contents?: true

Size: 1.24 KB

Versions: 50

Compression:

Stored size: 1.24 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 ResourceNotFound < Error
    def initialize
      super "[ERP Integration] Couldn't find the requested resource."
    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

50 entries across 50 versions & 1 rubygems

Version Path
erp_integration-0.57.0 lib/erp_integration/errors.rb
erp_integration-0.56.0 lib/erp_integration/errors.rb
erp_integration-0.55.0 lib/erp_integration/errors.rb
erp_integration-0.54.0 lib/erp_integration/errors.rb
erp_integration-0.53.1 lib/erp_integration/errors.rb
erp_integration-0.53.0 lib/erp_integration/errors.rb
erp_integration-0.52.0 lib/erp_integration/errors.rb
erp_integration-0.50.0 lib/erp_integration/errors.rb
erp_integration-0.49.0 lib/erp_integration/errors.rb
erp_integration-0.48.0 lib/erp_integration/errors.rb
erp_integration-0.43.0 lib/erp_integration/errors.rb
erp_integration-0.42.0 lib/erp_integration/errors.rb
erp_integration-0.41.0 lib/erp_integration/errors.rb
erp_integration-0.40.0 lib/erp_integration/errors.rb
erp_integration-0.39.0 lib/erp_integration/errors.rb
erp_integration-0.38.0 lib/erp_integration/errors.rb
erp_integration-0.37.0 lib/erp_integration/errors.rb
erp_integration-0.36.1 lib/erp_integration/errors.rb
erp_integration-0.36.0 lib/erp_integration/errors.rb
erp_integration-0.35.0 lib/erp_integration/errors.rb