mirkoperillo / resting

A visual HTTP client browser extension
https://resting.owlcode.eu/
GNU General Public License v3.0
27 stars 12 forks source link

Mismatch of body data between resting and actual API request #175

Closed nikhilraojl closed 1 year ago

nikhilraojl commented 1 year ago

image

The body for the above request should have been UNHANDLED_CLIENT_ERROR. But the body section of the extension is showing something different in both pretty and raw mode. Is this behavior expected?

mirkoperillo commented 1 year ago

Yes and no.

The JSON response you are seeing should manage cases where the response is error and there is no body payload This is the reference in the code https://github.com/mirkoperillo/resting/blob/5ddcf3d4a99a9b6e1a6e31b8a286c284665ddc75/src/js/app/request.js#L101

With the daily usage of Resting I have understood this behavior creates a lot of confusion because response is different from the real one.

I think this should be changed and being completely align to the API response.