n8n-nodes-github-copilot 3.38.14 → 3.38.15

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.
@@ -360,6 +360,16 @@ class GitHubCopilotOpenAI {
360
360
  catch (parseError) {
361
361
  console.error('Failed to parse API error:', parseError);
362
362
  }
363
+ const lowerMessage = cleanMessage.toLowerCase();
364
+ const is400Error = lowerMessage.includes("400") || lowerMessage.includes("bad request") ||
365
+ (apiError && apiError.error && apiError.error.code === "invalid_request_body");
366
+ if (is400Error) {
367
+ console.log('🚫 400 Bad Request detected - throwing non-retryable error');
368
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Bad Request (400): ${cleanMessage}`, {
369
+ itemIndex: i,
370
+ description: 'The request was malformed or contains invalid parameters. Retrying will not help.',
371
+ });
372
+ }
363
373
  let errorType = "invalid_request_error";
364
374
  let errorCode = null;
365
375
  let errorParam = null;
@@ -372,19 +382,7 @@ class GitHubCopilotOpenAI {
372
382
  console.log('✅ Using GitHub Copilot API error details');
373
383
  }
374
384
  else {
375
- const lowerMessage = cleanMessage.toLowerCase();
376
- const is400Error = lowerMessage.includes("400") || lowerMessage.includes("bad request");
377
- if (is400Error) {
378
- errorType = "invalid_request_error";
379
- errorCode = "invalid_request";
380
- finalMessage = cleanMessage;
381
- console.log('🚫 400 Bad Request detected - throwing non-retryable error');
382
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Bad Request (400): ${finalMessage}`, {
383
- itemIndex: i,
384
- description: 'The request was malformed or contains invalid parameters. Retrying will not help.',
385
- });
386
- }
387
- else if (lowerMessage.includes("403") || lowerMessage.includes("forbidden")) {
385
+ if (lowerMessage.includes("403") || lowerMessage.includes("forbidden")) {
388
386
  errorType = "invalid_request_error";
389
387
  errorCode = "insufficient_quota";
390
388
  if (lowerMessage.includes("access") && lowerMessage.includes("forbidden")) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.38.14",
3
+ "version": "3.38.15",
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.38.14",
3
+ "version": "3.38.15",
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",