Skip to content

Session not found handling #107

Open
@tikal

Description

@tikal

Bug description
After a server restart, a client calling the message endpoint with its session id it obtained via the previous running server instance gets a HTTP/1.1 500 Internal Server Error

Environment
java-sdk: 0.8.1 via Spring AI

Steps to reproduce
Call server message endpoint after a server restart, using previous sessionId

Expected behavior
Not too sure but it seems that the client should not interpret that there was indeed an internal server error because of a restart. It could either get a message which leads to recreating a session or there should be some sessions persistence between restart. There is a TODO around the code which returns the 500: https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-spring/mcp-spring-webflux/src/main/java/io/modelcontextprotocol/server/transport/WebFluxSseServerTransportProvider.java#L288

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions