TNO / knowledge-engine

Improves interoperability between systems (i.e. devices, platforms, apps, databases) by exchanging data based on their semantics
https://knowledge-engine.eu
Apache License 2.0
33 stars 4 forks source link

Answering with invalid bindings should result in a client error (HTTP 400) on the answering side #394

Open Sophietje opened 2 years ago

Sophietje commented 2 years ago

In GitLab by @han.kruiger.tno.nl on Jul 26, 2022, 08:07

bnouwt commented 5 months ago

Related to this: an error should probably be thrown when the AnswerHandler (or ReactHandler?) returns bindings with variables missing (i.e. variable that are available in the graph pattern but not in the returned binding set) or variables with names that should not be in there (so variables which do not occur in the graph pattern).

Also add a JUnit test for this, because that should be quite easy: just return a bindingset with expected variables missing or non-expected variables in there.