Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Glen Maddern
ffe9c8ab12 Treat 404s and 405s as the same regardless of starting with SSE or HTTPs transport
Fixes #47 #48
2025-05-02 11:19:22 +10:00

View file

@ -162,9 +162,10 @@ export async function connectToRemoteServer(
if (
error instanceof Error &&
shouldAttemptFallback &&
(sseTransport
? error.message.includes('405') || error.message.includes('Method Not Allowed')
: error.message.includes('404') || error.message.includes('Not Found'))
(error.message.includes('405') ||
error.message.includes('Method Not Allowed') ||
error.message.includes('404') ||
error.message.includes('Not Found'))
) {
log(`Received error: ${error.message}`)