-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception hierarchy under FeignException #823
Comments
@jerzykrlk |
Hi, I think the main benefit would not be less code, but just clener code. In my apps, there are many places where I catch For example:
I think it doesn't look good, especially with the same thing repeated in many places in code in many apps. I already have a custom This whole idea is a follow-up of the same feature in Spring All HTTP-related exceptions would inherit from Could you have a look at #825? - I think it illustrates my idea clearly. |
The role of the |
Ok, thank you for the update. You already have first vote, I guess... :) |
Closed via #825 |
With default error encoder, Feign client will throw
FeignException
, which is quite general, compared to variety of HTTP error codes and their REST semantics.In a rest-heavy application, introducing subclasses simplify quite a lot of my code.
Sample piece of code, now:
And the same piece code, expected:
This change seems quite easy, compared ti the code it saves. I could prepare a pull request, if you like the idea.
The text was updated successfully, but these errors were encountered: