UNPKG

n8n-nodes-nemotron

Version:

n8n community node for integrating NVIDIA's Nemotron Ultra 253B AI model

20 lines 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.nvidiaFailedAttemptHandler = nvidiaFailedAttemptHandler; function nvidiaFailedAttemptHandler(error) { var _a, _b, _c, _d, _e, _f; if (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status) === 429) { return 'rate_limit_exceeded'; } if (((_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.status) === 401 || ((_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.status) === 403) { return 'authentication_error'; } if (((_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.status) === 503 || ((_e = error === null || error === void 0 ? void 0 : error.response) === null || _e === void 0 ? void 0 : _e.status) === 500) { return 'service_unavailable'; } if ((_f = error === null || error === void 0 ? void 0 : error.message) === null || _f === void 0 ? void 0 : _f.includes('timeout')) { return 'timeout'; } return undefined; } //# sourceMappingURL=error-handling.js.map