<?php

namespace Alsendo\AlsendoWrapper\Exception;

use Exception;
use Throwable;

/**
 * Exception thrown when a response fails to be processed or returns an error status.
 * This exception is used to indicate issues that occur during the handling of a response,
 * such as invalid data, server errors, or communication failures.
 *
 * It extends the built-in Exception class and provides a standardized way to handle
 * response-related errors with a specific HTTP status code.
 *
 * @throws ResponseException when a response processing error occurs
 */
class ResponseException extends Exception
{
    public function __construct($message, int $code = 400, ?Throwable $previous = null)
    {
        parent::__construct($message, $code, $previous);
    }
}