GenerAI / worldmonitor /api /mcp /source-unavailable.ts
amogaddy's picture
Integra World Monitor (AGPL-3.0, self-hosted) nello Space: pagina, menu, e arricchimento notizie per la AI
3464008 verified
Raw
History Blame Contribute Delete
682 Bytes
/**
* Expected analysis-tool failure when every live input is unavailable.
*
* The cache key lists are safe, bounded identifiers (never payload content).
* Dispatch preserves them in JSON-RPC error.data so agents can distinguish a
* retryable source outage from an implementation failure.
*/
export class McpSourceUnavailableError extends Error {
readonly unavailableInputs: string[];
readonly failedInputs: string[];
constructor(message: string, unavailableInputs: string[], failedInputs: string[]) {
super(message);
this.name = 'McpSourceUnavailableError';
this.unavailableInputs = [...unavailableInputs];
this.failedInputs = [...failedInputs];
}
}