MCPcopy Index your code
hub / github.com/nodejs/node / wrapError

Function wrapError

lib/internal/streams/iter/utils.js:188–190  ·  view source on GitHub ↗

* Wrap a caught value as an Error, converting non-Error values. * @param {unknown} error * @returns {Error}

(error)

Source from the content-addressed store, hash-verified

186 * @returns {Error}
187 */
188function wrapError(error) {
189 return isError(error) ? error : new ERR_OPERATION_FAILED(String(error));
190}
191
192/**
193 * Check if a value implements a Symbol-keyed protocol (has a function

Callers 6

#pullFromSourceMethod · 0.85
#pullFromSourceMethod · 0.85
pumpFunction · 0.85
createAsyncPipelineFunction · 0.85
pipeToSyncFunction · 0.85
pipeToFunction · 0.85

Calls 2

StringClass · 0.85
isErrorFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…