nRF905-API icon indicating copy to clipboard operation
nRF905-API copied to clipboard

Send different HTTP status code on error

Open DevSecNinja opened this issue 5 years ago • 0 comments

When I use the new api/test/fan/querydevice.json query, it returns a 200 status code even when the API could not receive a reply from the Zehnder system:

image

I think that in this case it might be better to return a different status code. Maybe 504 is a better way of handling this error.

It would also make it much easier for e.g. Home Assistant to understand that something went wrong and that the previous state needs to be kept until a successful call can be made.

Thanks!

DevSecNinja avatar Nov 09 '20 10:11 DevSecNinja