Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/client/src/client/streamableHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,11 @@ export class StreamableHTTPClientTransport implements Transport {

await response.text?.().catch(() => {});

// 405 indicates that the server does not offer an SSE stream at GET endpoint
// This is an expected case that should not trigger an error
if (response.status === 405) {
// 404: Server has no GET handler for this endpoint (POST-only)
// 405: Server explicitly does not allow GET
// 406: Server rejects Accept header for GET
// All indicate the server does not offer an SSE stream at the GET endpoint
if (response.status === 404 || response.status === 405 || response.status === 406) {
return;
}

Expand Down
Loading