traverson
traverson copied to clipboard
[discussion] Should HTTP status codes be treated differently when convertResponseToObject is enabled
For example:
- for get, post, put, ... without convertResponseToObject no HTTP status (including 4xx and 5xx) would be treated as an error.
- for getResource and get, post, put, ... with convertResponseToObject HTTP status outside of 200 - 299 (in particular 4xx and 5xx) would be treated as an error.
See also https://github.com/basti1302/traverson-angular/issues/14.
I'm not sure if it is a good idea to change the semantics of "error" and therefore error handling code depending on a configuration option. It has a certain smell to it.