module Abt::HttpError
Public Class Methods
error_class_for_status(status)
click to toggle source
# File lib/abt/http_error.rb, line 29 def self.error_class_for_status(status) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLength case status when 400 then BadRequestError when 401 then UnauthorizedError when 403 then ForbiddenError when 404 then NotFoundError when 405 then MethodNotAllowedError when 415 then UnsupportedMediaTypeError when 422 then ProcessingError when 429 then TooManyRequestsError when 500 then InternalServerError when 501 then NotImplementedError else UnknownError end end