MCPcopy Create free account
hub / github.com/apify/impit / rethrowNativeError

Function rethrowNativeError

impit-node/errors.js:72–82  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

70};
71
72function rethrowNativeError(err) {
73 const match = err.message?.match(/^(\w+): ([\s\S]*)$/);
74 if (match) {
75 const [, code, message] = match;
76 const ErrorClass = errorClassMap[code];
77 if (ErrorClass) {
78 throw new ErrorClass(message);
79 }
80 }
81 throw err;
82}
83
84module.exports = {
85 rethrowNativeError,

Callers 1

fetchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…