Skip to content

hardware: Fix 422 response, add `state_ok`

Stuart Fisher requested to merge hardware-422-state-ok into main

Cherry picked hardware changes from !830

  • Calling set property or execute function with a non-valid payload (i.e. int instead of string) on a hardware device will now return the correct ValidationError response with a messages dict. Before this had mistakenly stringified the dict response into an error . Need to check if this has broken anything. I.e. response was {"error": '{"velocity": ["Not a valid number."]'}, and is now {"messages": {"velocity": ["Not a valid number."]}
  • state_ok is dynamically added to hardware properties this allows the UI to know if a hardware object is ok without having to iterate through the states on the client

Merge request reports

Loading