UNPKG

n8n-nodes-databricks-api

Version:
28 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeN8nLlmFailedAttemptHandler = void 0; const n8n_workflow_1 = require("n8n-workflow"); const n8nDefaultFailedAttemptHandler_1 = require("./n8nDefaultFailedAttemptHandler"); const makeN8nLlmFailedAttemptHandler = (ctx, handler) => { return (error) => { try { handler === null || handler === void 0 ? void 0 : handler(error); (0, n8nDefaultFailedAttemptHandler_1.n8nDefaultFailedAttemptHandler)(error); } catch (e) { const apiError = new n8n_workflow_1.NodeApiError(ctx.getNode(), e, { functionality: 'configuration-node', }); throw apiError; } if ((error === null || error === void 0 ? void 0 : error.retriesLeft) > 0) { return; } const apiError = new n8n_workflow_1.NodeApiError(ctx.getNode(), error, { functionality: 'configuration-node', }); throw apiError; }; }; exports.makeN8nLlmFailedAttemptHandler = makeN8nLlmFailedAttemptHandler; //# sourceMappingURL=n8nLlmFailedAttemptHandler.js.map