33 lines
656 B
PHP
33 lines
656 B
PHP
<?php
|
|
|
|
namespace app\service\LLM;
|
|
|
|
use RuntimeException;
|
|
|
|
class LLMRequestException extends RuntimeException
|
|
{
|
|
public function __construct(
|
|
string $message,
|
|
private readonly ?int $statusCode = null,
|
|
private readonly ?string $providerCode = null,
|
|
private readonly ?array $payload = null
|
|
) {
|
|
parent::__construct($message, $statusCode ?? 0);
|
|
}
|
|
|
|
public function statusCode(): ?int
|
|
{
|
|
return $this->statusCode;
|
|
}
|
|
|
|
public function providerCode(): ?string
|
|
{
|
|
return $this->providerCode;
|
|
}
|
|
|
|
public function payload(): ?array
|
|
{
|
|
return $this->payload;
|
|
}
|
|
}
|