XRPC: should unknown parameters be ignored? Or fail validation? #5094
snarfed
started this conversation in
Protocol (atproto)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all! For records and other lexicon objects, the lexicon spec makes it pretty clear that undefined field are allowed, and code should ignore them and not fail validation. Anyone know if that also applies to unknown parameters, and I guess input fields, in XRPC queries, methods, and subscriptions? I don't see anything in the XRPC spec.
Concretely, I recently saw an XRPC request to
/xrpc/com.atproto.server.describeServer?repo=did:plc:aopj66ocaplk5hx4qfeqc4sx.describeServerdoesn't have a repo parameter, so my server failed validation on the request and returned a 400, but I suspect it should have ignoredrepoand served the request normally. nelind on #lexicon on the Discord agreed. Thoughts?Beta Was this translation helpful? Give feedback.
All reactions