Sha256: 32717ff8f4fdc11cc846be07f5206dcf33a1b97a417aeb91785df87ea9c58f7b

Contents?: true

Size: 1.3 KB

Versions: 4

Compression:

Stored size: 1.3 KB

Contents

module Gitlab
  module Error
    # Custom error class for rescuing from all Gitlab errors.
    class Error < StandardError; end

    # Raise when attributes are missing.
    class MissingAttributes < Error; end

    # Raised when API endpoint credentials not configured.
    class MissingCredentials < Error; end

    # Raised when impossible to parse response body.
    class Parsing < Error; end

    # Raised when API endpoint returns the HTTP status code 400.
    class BadRequest < Error; end

    # Raised when API endpoint returns the HTTP status code 401.
    class Unauthorized < Error; end

    # Raised when API endpoint returns the HTTP status code 403.
    class Forbidden < Error; end

    # Raised when API endpoint returns the HTTP status code 404.
    class NotFound < Error; end

    # Raised when API endpoint returns the HTTP status code 405.
    class MethodNotAllowed < Error; end

    # Raised when API endpoint returns the HTTP status code 409.
    class Conflict < Error; end

    # Raised when API endpoint returns the HTTP status code 500.
    class InternalServerError < Error; end

    # Raised when API endpoint returns the HTTP status code 502.
    class BadGateway < Error; end

    # Raised when API endpoint returns the HTTP status code 503.
    class ServiceUnavailable < Error; end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gitlab-3.3.0 lib/gitlab/error.rb
gitlab-3.2.0 lib/gitlab/error.rb
gitlab-3.1.0 lib/gitlab/error.rb
gitlab-3.0.0 lib/gitlab/error.rb