MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / createSystemAPIErrorMessage

Function createSystemAPIErrorMessage

source code/utils/messages.ts:4587–4605  ·  view source on GitHub ↗
(
  error: APIError,
  retryInMs: number,
  retryAttempt: number,
  maxRetries: number,
)

Source from the content-addressed store, hash-verified

4585}
4586
4587export function createSystemAPIErrorMessage(
4588 error: APIError,
4589 retryInMs: number,
4590 retryAttempt: number,
4591 maxRetries: number,
4592): SystemAPIErrorMessage {
4593 return {
4594 type: 'system',
4595 subtype: 'api_error',
4596 level: 'error',
4597 cause: error.cause instanceof Error ? error.cause : undefined,
4598 error,
4599 retryInMs,
4600 retryAttempt,
4601 maxRetries,
4602 timestamp: new Date().toISOString(),
4603 uuid: randomUUID(),
4604 }
4605}
4606
4607/**
4608 * Checks if a message is a compact boundary marker

Callers 1

withRetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected