Sha256: 76d2a4ec36657694c89b974cbee71390e3b443b60c764c7d05ce142e22533961

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

# Shamelessly stealed from Octokit 
module Githu3
  # Custom error class for rescuing from all GitHub errors
  class Error < StandardError; end

  # Raised when GitHub returns a 400 HTTP status code
  class BadRequest < Error; end

  # Raised when GitHub returns a 401 HTTP status code
  class Unauthorized < Error; end

  # Raised when GitHub returns a 403 HTTP status code
  class Forbidden < Error; end

  # Raised when GitHub returns a 404 HTTP status code
  class NotFound < Error; end

  # Raised when GitHub returns a 406 HTTP status code
  class NotAcceptable < Error; end

  # Raised when GitHub returns a 422 HTTP status code
  class UnprocessableEntity < Error; end

  # Raised when GitHub returns a 500 HTTP status code
  class InternalServerError < Error; end

  # Raised when GitHub returns a 501 HTTP status code
  class NotImplemented < Error; end

  # Raised when GitHub returns a 502 HTTP status code
  class BadGateway < Error; end

  # Raised when GitHub returns a 503 HTTP status code
  class ServiceUnavailable < Error; end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
githu3-0.0.8 lib/githu3/error.rb
githu3-0.0.7 lib/githu3/error.rb
githu3-0.0.6 lib/githu3/error.rb
githu3-0.0.5 lib/githu3/error.rb
githu3-0.0.4 lib/githu3/error.rb
githu3-0.0.3 lib/githu3/error.rb