OpenFeign/feign

Allow for 3xx range headers

Open

#249 geöffnet am 12. Juli 2015

Auf GitHub ansehen
 (28 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (1.911 Forks)batch import
documentationhelp wanted

Repository-Metriken

Stars
 (9.070 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 17h) (71 gemergte PRs in 30 T)

Beschreibung

Everything above 299 is considered an error, which is plainly incorrect.

To get around this I had to:

  1. add an error decoder
  2. throw a special exception for 3xx range
  3. when catching runtime errors, check if it is the special 300 error
  4. convert to a valid response entity

Will investigate replacing this line:

if (response.status() >= 200 && response.status() < 300) { in SynchronousMethodHandler and PR'ing it. I just wonder why nobody else has come across this issue.

Should I fix it?

Contributor Guide