Repository navigation
mcp: infer URL mode and reject incomplete input in URLElicitationRequiredError - #1501
Closed
QuentinBisson wants to merge 1 commit into
Closed
QuentinBisson wants to merge 1 commit into
QuentinBisson wants to merge 1 commit into
Conversation
…iredError URLElicitationRequiredError panicked on an empty mode that Elicit infers as "url", and accepted elicitations without a URL or elicitation ID, building a -32042 that ParseURLElicitationRequiredError rejects. It now infers the mode like Elicit and returns a plain error for an empty list, a nil elicitation, or a missing URL or elicitation ID. Fixes modelcontextprotocol#1500
Contributor
|
This PR has been closed automatically. It's still a draft, but we close those early so you don't put in more time only to have it closed the moment you mark it ready. This repo only keeps pull requests open when they come from a maintainer, or from a contributor a maintainer has assigned to the linked issue, and you aren't currently assigned to #1500. You're welcome to keep pushing commits here (just avoid force-pushing, since GitHub can't reopen a rewritten branch), but that on its own won't get the PR reviewed or the issue assigned. There's no need to open a new PR either way. Maintainers: reopen, remove |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
URLElicitationRequiredErrorpanicked on an empty mode thatServerSession.Elicitinfers as"url", and accepted elicitations without a URL or elicitation ID, so a server could build a-32042thatParseURLElicitationRequiredErrorrejects. It now infers the mode likeElicitand marshals the inferred copies. An empty list, a nil elicitation, or a missing URL or elicitation ID returns a plain error instead of a panic, since those values are usually computed at runtime and a handler panic is not recovered. An explicit non-URL mode still panics.Fixes #1500
AI assistance: used to draft the code, tests and this description; I reviewed every line.