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

Function extractUnknownErrorFormat

source code/services/api/errors.ts:413–425  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

411 * Given a response that doesn't look quite right, see if it contains any known error types we can extract.
412 */
413export function extractUnknownErrorFormat(value: unknown): string | undefined {
414 // Check if value is a valid object first
415 if (!value || typeof value !== 'object') {
416 return undefined
417 }
418
419 // Amazon Bedrock routing errors
420 if ((value as AmazonError).Output?.__type) {
421 return (value as AmazonError).Output!.__type
422 }
423
424 return undefined
425}
426
427export function getAssistantMessageFromError(
428 error: unknown,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected