MCPcopy Create free account
hub / github.com/pmxt-dev/pmxt / isNodeError

Function isNodeError

core/src/utils/error-mapper.ts:64–66  ·  view source on GitHub ↗

Type guard for Node.js-style errors with a `code` property.

(value: unknown)

Source from the content-addressed store, hash-verified

62
63/** Type guard for Node.js-style errors with a `code` property. */
64function isNodeError(value: unknown): value is NodeError {
65 return value instanceof Error && 'code' in value;
66}
67
68/**
69 * Maps raw errors to PMXT unified error classes

Callers 1

mapErrorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected