OpenFeign/feign

Allow for 3xx range headers

Open

#249 建立於 2015年7月12日

在 GitHub 查看
 (28 留言) (0 反應) (0 負責人)Java (1,911 fork)batch import
documentationhelp wanted

倉庫指標

Star
 (9,070 star)
PR 合併指標
 (平均合併 2天 17小時) (30 天內合併 71 個 PR)

描述

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?

貢獻者指南