All decoders follow rule: if a status is 404 it returns empty or null value#1597
Conversation
|
Should I update the changelog? |
Since we started doing GitHub releases, we pretty much stop updating the changelog May be needs a final entry saying so |
|
Cool, thanks for fixing this. I've got a question however: is there any reason why the decoders distinguish between 204/404 decoding to (if defined) an empty version of the required type (e.g. an empty List), and, with other status codes, a null body, decoding to null? |
|
Good note. I suppose that we should use The code if (response.body() == null) return null;is too old, from first implementation, e. g. |
…l value (#1597) * All decoders follow rule: if status 404 it returns empty or null value * Replace decode404 with dismiss404
…l value (#1597) * All decoders follow rule: if status 404 it returns empty or null value * Replace decode404 with dismiss404
Now some decoders follow this rule but other don't.
After 11.6 the flag
decode404doesn't work as it is described in the documentation. In new implementation a response body will be ignored, not decoded. I propose to replacedecode404withdismiss404following the comment #1529 (comment)Fixes #1595