The firmware currently always returns HTTP 200 (unless it is not responsive, in that case, nothing of course).
This is weird and incorrect IMHO. If there is something wrong with the request, the returned HTTP status code should reflect that.
Right now, one has to build custom error handling because of this, while normally one should be able to rely on HTTP specs.
For example:
This is a non-existing URL, while the API throws an error 422 in the response JSON; it should have thrown an HTTP 404 status code (since it does not exists).
Same for invalid data and other things once would expect a 400 or higher HTTP response code.
The firmware currently always returns HTTP 200 (unless it is not responsive, in that case, nothing of course).
This is weird and incorrect IMHO. If there is something wrong with the request, the returned HTTP status code should reflect that.
Right now, one has to build custom error handling because of this, while normally one should be able to rely on HTTP specs.
For example:
This is a non-existing URL, while the API throws an error 422 in the response JSON; it should have thrown an HTTP 404 status code (since it does not exists).
Same for invalid data and other things once would expect a 400 or higher HTTP response code.