Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

When retry is enabled, all exceptions return 404 #1224

Open
zhr6525 opened this issue Jul 7, 2023 · 2 comments
Open

When retry is enabled, all exceptions return 404 #1224

zhr6525 opened this issue Jul 7, 2023 · 2 comments
Labels
Status: Need reproduce Issue waits for reproducing

Comments

@zhr6525
Copy link

zhr6525 commented Jul 7, 2023

馃洃 When retry is enabled, all exceptions return 404

Problem Phenomenon

I created an API gateway, turned on the retry policy, requested an action for a nonexistent service, and found that the error message returned was 404 instead of the service is not registered.
image

Failure Information

I tried to trace the code, and found that an external request will first enter the rest handler, then parse the route, and call the real request. When the real request fails, rest will also retry, but in line 64 of retrie.js, it will use the current context to retry, at this time the url has changed and there is no route information. Therefore, null is returned

I understand this is to prevent the request of rest in the same class to be repeated, but how to return the correct error rather than 404

@zhr6525
Copy link
Author

zhr6525 commented Jul 7, 2023

I fixed the error code, and checked the error code in the retry strategy, which seemed to solve the current problem

@icebob
Copy link
Member

icebob commented Jul 11, 2023

Please create a repro example.

@icebob icebob added the Status: Need reproduce Issue waits for reproducing label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Need reproduce Issue waits for reproducing
Projects
None yet
Development

No branches or pull requests

2 participants