mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-07 08:25:23 +02:00
fix(mcp): detect non-standard OAuth errors from servers returning HTTP 400
This commit is contained in:
parent
59bd27b4f4
commit
7175ee0e1d
2 changed files with 8 additions and 0 deletions
|
|
@ -455,6 +455,10 @@ export class MCPConnectionFactory {
|
|||
if (message.includes('authentication required') || message.includes('unauthorized')) {
|
||||
return true;
|
||||
}
|
||||
// Check for missing authorization values (e.g., Amazon Ads MCP returns HTTP 400 with this)
|
||||
if (message.includes('no authorization')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1131,6 +1131,10 @@ export class MCPConnection extends EventEmitter {
|
|||
if (message.includes('authentication required') || message.includes('unauthorized')) {
|
||||
return true;
|
||||
}
|
||||
// Check for missing authorization values (e.g., Amazon Ads MCP returns HTTP 400 with this)
|
||||
if (message.includes('no authorization')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue