Stream: implementers
Topic: lenient handling and chained search
Paul Church (Jan 20 2022 at 18:11):
Under lenient handling, the "Client requests that the server ignore any unknown or unsupported parameter". What if the unsupported parameter is not a top-level parameter, but instead inside a chain or _has?
Suppose a server is doing lenient handling for a search Encounter?subject:Group.foo=bar
Should we:
- Reject the search with an error. Lenient handling was intended for top level query parameters only.
- Ignore the entire parameter "subject:Group.foo", return a self link that does not include this parameter at all.
- Ignore only "foo", perform the inner search without it (which would return all Groups, I suppose). Does the type modifier still limit the results to only Encounter where subject is a Group? What would the self link look like?
Michele Mottini (Jan 20 2022 at 18:48):
We do (1)
Lloyd McKenzie (Jan 20 2022 at 21:30):
Returning the data not properly filtered by chain and has isn't super useful as there's nothing the server can do with it. On the other hand, at least returning a result with the search parameters you do understand provides a computable way for the client to understand the issue and decide what to do about it. On the other hand, if you just fail, the client has no clue what happened and the user is stuck. So my leaning is that #2 is best. I wouldn't recommend #3.
Lloyd McKenzie (Jan 20 2022 at 21:30):
Of course, if you don't trust the client to check the self link, then #1 is reasonable.
Last updated: Apr 12 2022 at 19:14 UTC