You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reject an empty body on VWS endpoints which take JSON
An empty body given to POST /targets, PUT /targets/{id},
POST /targets/{id}/instances or the reco counts report endpoint raised an
uncaught JSONDecodeError from validate_keys, because validate_json
returned early for an empty body.
Match real Vuforia instead: 500 Fail for the target endpoints, 400 Fail
for the reco counts report and 400 BadRequest for instance generation.
Add a test which runs against real Vuforia, since an empty body is
answered promptly unlike other malformed bodies.
Closes#3550
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Return a response, rather than raising an uncaught ``JSONDecodeError``, when an empty body is given to a VWS endpoint which takes a JSON body.
2
+
As real Vuforia does, ``POST /targets`` and ``PUT /targets/<target_id>`` now return a 500 ``Fail`` response, the reco counts report endpoint returns a 400 ``Fail`` response, and the VuMark instance generation endpoint returns a 400 ``BadRequest`` response.
0 commit comments