Sha256: 61f99afe31051ac4a1044a2001bc1c079b15a5edd1865b68ee43dd4a6c0dc698

Contents?: true

Size: 1.64 KB

Versions: 12

Compression:

Stored size: 1.64 KB

Contents

# frozen_string_literal: true

module Trusona
  ##
  # A generic error for when things go wrong, but we're not sure why
  class TrusonaError < StandardError; end

  ##
  # An error that occurs when the configuration is incorrect or invalid
  class ConfigurationError < TrusonaError; end

  ##
  # An error resulting from a resource that is invalid due to missing
  # required fields
  class InvalidResourceError < TrusonaError; end

  ##
  # An error used to indicate a failure in HMAC signing
  class SigningError < TrusonaError; end

  ##
  # An error reserved for problems communicating with the Trusona REST API
  class RequestError < TrusonaError; end

  ##
  # The result of attempting to access the Trusona REST API with invalid
  # or missing SDK Keys (Token and Secret)
  class UnauthorizedRequestError < RequestError; end

  ##
  # An error for resulting from 50x errors from the Trusona REST API
  class ApiError < RequestError; end

  ##
  # An error resulting from 404 errors from the Trusona REST API
  class ResourceNotFoundError < RequestError; end

  ##
  # An error resulting from 400 errors from the Trusona REST API
  class BadRequestError < RequestError; end

  ##
  # An error resulting from 422 errors from the Trusona REST API
  class UnprocessableEntityError < RequestError; end

  ##
  # An error resulting from 424 errors from the Trusona REST API
  class FailedDependencyError < RequestError; end

  ##
  # An error resulting from trying to find a record without a valid
  # identifier. Prempts a `Trusona::ResourceNotFoundError` error by
  # not making a network request with an invalid identifier.
  class InvalidRecordIdentifier < TrusonaError; end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
trusona-2.5.3 lib/trusona/errors.rb
trusona-2.5.2 lib/trusona/errors.rb
trusona-2.5.1 lib/trusona/errors.rb
trusona-2.5.0 lib/trusona/errors.rb
trusona-2.4.0 lib/trusona/errors.rb
trusona-2.3.0 lib/trusona/errors.rb
trusona-2.2.0 lib/trusona/errors.rb
trusona-2.1.0 lib/trusona/errors.rb
trusona-2.0.0 lib/trusona/errors.rb
trusona-1.0.1 lib/trusona/errors.rb
trusona-1.0.0 lib/trusona/errors.rb
trusona-0.20.0 lib/trusona/errors.rb