@cumulus/common
Version:
Common utilities used across tasks
13 lines • 517 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseCaughtError = void 0;
/**
* This method is for parsing a caught error which is not an HTTPerror
* in case the EDL endpoint call results in an unexpected error
*
* @param {unkown} e - the Error, if e isn't of type Error then it returns itself
* @returns {Error}
*/
const parseCaughtError = (e) => (e instanceof Error ? e : new Error(`${e}`));
exports.parseCaughtError = parseCaughtError;
//# sourceMappingURL=errors.js.map