MCPcopy Create free account
hub / github.com/anus-dev/ANUS / isStructuredError

Function isStructuredError

packages/core/src/utils/quotaErrorDetection.ts:29–36  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

27}
28
29export function isStructuredError(error: unknown): error is StructuredError {
30 return (
31 typeof error === 'object' &&
32 error !== null &&
33 'message' in error &&
34 typeof (error as StructuredError).message === 'string'
35 );
36}
37
38export function isProQuotaExceededError(error: unknown): boolean {
39 // Check for Pro quota exceeded errors by looking for the specific pattern

Callers 3

isProQuotaExceededErrorFunction · 0.70
parseAndFormatApiErrorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected