Title: fix: add warning log when session ID is unknown or expired by haroldfabla2-hue · Pull Request #2230 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: fix: add warning log when session ID is unknown or expired by haroldfabla2-hue · Pull Request #2230 · modelcontextprotocol/python-sdk
X Title: fix: add warning log when session ID is unknown or expired by haroldfabla2-hue · Pull Request #2230 · modelcontextprotocol/python-sdk
Description: Summary Adds a logger.warning() call in the else branch of StreamableHTTPSessionManager._handle_stateful_request() when a request arrives with an unknown or expired session ID. Problem The other two branches in this method already log: logger.debug("Session already exists for session ID ...") logger.info("Created new transport for session ...") But the else branch (unknown/expired session) returns a 404 silently, making it difficult to diagnose why connections are failing — especially after server restarts when clients send stale mcp-session-id headers. Change Added logger.warning() with the rejected session ID to help operators identify stale session issues. Closes #2204
Open Graph Description: Summary Adds a logger.warning() call in the else branch of StreamableHTTPSessionManager._handle_stateful_request() when a request arrives with an unknown or expired session ID. Problem The other tw...
X Description: Summary Adds a logger.warning() call in the else branch of StreamableHTTPSessionManager._handle_stateful_request() when a request arrives with an unknown or expired session ID. Problem The other tw...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2230
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8b3b4fe7-a18b-c743-2852-1b2b680a8ef2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CADA:37829C:7E79AF:A9CB8C:6A581401 |
| html-safe-nonce | bd17cd3af9476250b0512b25f1176033cdb32e0bbe970d386d9af91d2c5278b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQURBOjM3ODI5Qzo3RTc5QUY6QTlDQjhDOjZBNTgxNDAxIiwidmlzaXRvcl9pZCI6IjE0NDc4OTAyMDk0ODg3NzAwNDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1fb42774823148233a047790b5a9499904f777a8c3d0a24b928b020ceedbc36b |
| hovercard-subject-tag | pull_request:3362993175 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2230/files |
| twitter:image | https://avatars.githubusercontent.com/u/229189334?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/229189334?s=400&v=4 |
| og:image:alt | Summary Adds a logger.warning() call in the else branch of StreamableHTTPSessionManager._handle_stateful_request() when a request arrives with an unknown or expired session ID. Problem The other tw... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3fb1f684e7a833eb1b2d01d39875a2b52cb4fe9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width