traverson icon indicating copy to clipboard operation
traverson copied to clipboard

[discussion] Should HTTP status codes be treated differently when convertResponseToObject is enabled

Open basti1302 opened this issue 9 years ago • 0 comments

For example:

  1. for get, post, put, ... without convertResponseToObject no HTTP status (including 4xx and 5xx) would be treated as an error.
  2. 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.

basti1302 avatar Aug 27 '15 19:08 basti1302