php-mcp/src/Mcp/Exceptions/CircuitOpenException.php
Snider fc1c2ef573 refactor: update namespaces for L1 package convention
- Mod\Mcp -> Core\Mcp
- Core\Mod\Tenant -> Core\Tenant

Part of namespace restructure to align with L1/L2 module conventions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:34:35 +00:00

27 lines
637 B
PHP

<?php
declare(strict_types=1);
namespace Core\Mcp\Exceptions;
use RuntimeException;
/**
* Exception thrown when the circuit breaker is open and no fallback is provided.
*
* This indicates the target service is temporarily unavailable due to repeated failures.
*/
class CircuitOpenException extends RuntimeException
{
public function __construct(
public readonly string $service,
string $message = '',
) {
$message = $message ?: sprintf(
"Service '%s' is temporarily unavailable. Please try again later.",
$service
);
parent::__construct($message);
}
}