n8n-nodes-github-copilot 3.31.30 → 3.31.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GitHubCopilotOpenAI = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
4
5
  const nodeProperties_1 = require("./nodeProperties");
5
6
  const utils_1 = require("../GitHubCopilotChatAPI/utils");
6
7
  const GitHubCopilotEndpoints_1 = require("../../shared/utils/GitHubCopilotEndpoints");
@@ -282,7 +283,18 @@ class GitHubCopilotOpenAI {
282
283
  }
283
284
  else {
284
285
  const lowerMessage = cleanMessage.toLowerCase();
285
- if (lowerMessage.includes("403") || lowerMessage.includes("forbidden")) {
286
+ const is400Error = lowerMessage.includes("400") || lowerMessage.includes("bad request");
287
+ if (is400Error) {
288
+ errorType = "invalid_request_error";
289
+ errorCode = "invalid_request";
290
+ finalMessage = cleanMessage;
291
+ console.log('🚫 400 Bad Request detected - throwing non-retryable error');
292
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Bad Request (400): ${finalMessage}`, {
293
+ itemIndex: i,
294
+ description: 'The request was malformed or contains invalid parameters. Retrying will not help.',
295
+ });
296
+ }
297
+ else if (lowerMessage.includes("403") || lowerMessage.includes("forbidden")) {
286
298
  errorType = "invalid_request_error";
287
299
  errorCode = "insufficient_quota";
288
300
  if (lowerMessage.includes("access") && lowerMessage.includes("forbidden")) {
@@ -303,11 +315,6 @@ class GitHubCopilotOpenAI {
303
315
  errorCode = "invalid_api_key";
304
316
  finalMessage = "Incorrect API key provided. You can find your API key at https://platform.openai.com/account/api-keys.";
305
317
  }
306
- else if (lowerMessage.includes("400") || lowerMessage.includes("bad request")) {
307
- errorType = "invalid_request_error";
308
- errorCode = "invalid_request";
309
- finalMessage = cleanMessage;
310
- }
311
318
  else if (lowerMessage.includes("429") || lowerMessage.includes("rate limit")) {
312
319
  errorType = "rate_limit_error";
313
320
  errorCode = "rate_limit_exceeded";
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.31.30",
3
+ "version": "3.31.31",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.31.30",
3
+ "version": "3.31.31",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",