-
Notifications
You must be signed in to change notification settings - Fork 143
[Schema][Server] Preserve request id in JSON-RPC error responses instead of fabricating id:"" #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
79e6632
40b4c6b
e78be29
262db1a
84fb7b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 🟡 🔵 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ JSON-RPC 2.0 allows
id: nullin requests. Hereisset()drops it, so a null-id invalid request falls back to thenulldefault inforInvalidRequest()— same outcome, fine. Intentional? If so, worth a one-line comment so the next reader doesn't "fix" it by switching toarray_key_exists.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional - isset + the type guard. We only recover valid
string|intids; a null or non-scalar id stays at the exception's null default.array_key_existswould converge to the same via the type guard. Leaving a comment in the code.