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

Function isStructuredError

packages/core/src/core/loggingContentGenerator.ts:36–43  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

34}
35
36export function isStructuredError(error: unknown): error is StructuredError {
37 return (
38 typeof error === 'object' &&
39 error !== null &&
40 'status' in error &&
41 typeof (error as StructuredError).status === 'number'
42 );
43}
44
45/**
46 * A decorator that wraps a ContentGenerator to add logging to API calls.

Callers 1

_logApiErrorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected