# frozen_string_literal: true module Qismo class Error < StandardError attr_reader :message end class HTTPTimeoutError < Error def initialize(message) super(message) end end class HTTPRequestError < Error attr_reader :message, :status_code, :response_body def initialize(message, status_code:, response_body:) super(message.to_s) @message = message @status_code = status_code @response_body = response_body end end class InternalServerError < HTTPRequestError end # 400 class BadRequestError < HTTPRequestError end # 401 class UnauthorizedError < HTTPRequestError end # 402 class PaymentRequiredError < HTTPRequestError end # 403 class ForbiddenError < HTTPRequestError end # 404 class NotFoundError < HTTPRequestError end # 429 class TooManyRequestError < HTTPRequestError end end