
| Current Path : /var/www/html/konvbav/vendor/maxmind/web-service-common/src/Exception/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/konvbav/vendor/maxmind/web-service-common/src/Exception/InvalidRequestException.php |
<?php
declare(strict_types=1);
namespace MaxMind\Exception;
/**
* Thrown when a MaxMind web service returns an error relating to the request.
*/
class InvalidRequestException extends HttpException
{
/**
* The code returned by the MaxMind web service.
*/
private readonly string $error;
/**
* @param string $message the exception message
* @param string $error the error code returned by the MaxMind web service
* @param int $httpStatus the HTTP status code of the response
* @param string $uri the URI queries
* @param \Throwable $previous the previous exception, if any
*/
public function __construct(
string $message,
string $error,
int $httpStatus,
string $uri,
?\Throwable $previous = null
) {
$this->error = $error;
parent::__construct($message, $httpStatus, $uri, $previous);
}
public function getErrorCode(): string
{
return $this->error;
}
}