MCPcopy Index your code
hub / github.com/nodejs/node / #unwrapMessage

Method #unwrapMessage

lib/internal/modules/esm/hooks.js:650–666  ·  view source on GitHub ↗
(response)

Source from the content-addressed store, hash-verified

648 }
649
650 #unwrapMessage(response) {
651 if (response.message.status === 'never-settle') {
652 return new Promise(() => {});
653 }
654 const { status, body } = response.message;
655 if (status === 'error') {
656 if (body == null || typeof body !== 'object') { throw body; }
657 if (body.serializationFailed || body.serialized == null) {
658 throw new ERR_WORKER_UNSERIALIZABLE_ERROR();
659 }
660
661 // eslint-disable-next-line no-restricted-syntax
662 throw deserializeError(body.serialized);
663 } else {
664 return body;
665 }
666 }
667}
668ObjectSetPrototypeOf(AsyncLoaderHookWorker.prototype, null);
669

Callers 3

waitForWorkerMethod · 0.95
makeAsyncRequestMethod · 0.95
makeSyncRequestMethod · 0.95

Calls 1

deserializeErrorFunction · 0.85

Tested by

no test coverage detected