-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
API base url parsing does not work for eventstream #4521
Comments
Make sure it's not an issue after #5128 |
I have opened a PR to address this #6179 but I am not sure if we should throw an error if server responds with a 404 (which it did previously due to Right now the only errors that are considered "unrecoverable" are 400 and 500 status codes, those are also defined in the spec. lodestar/packages/api/src/beacon/client/events.ts Lines 36 to 42 in 959a8af
The problem is that the eventstream will be closed permanently if we reject on error here which might not be desired for 404 errors because the issue could be related to a proxy misconfiguration, same goes for 401 errors, those could be potentially recoverable and it might be safer to retry connecting the eventstream. Even if we don't consider 401 / 404 as fatal errors we should definitely find a solution to log those errors which is currently not done as handler does not have access to logger lodestar/packages/api/src/beacon/client/events.ts Lines 44 to 45 in 959a8af
The http client throws an error if base url format is invalid, the expected behavior stated in this PR should be addressed once #6179 is merged |
Describe the bug
If someone using a base url ending with
/
that make theapi.events.
namespace to not work. All other namespaces works fine.Expected behavior
It should work fine without any error by parsing the base url correctly. If not then it should throw some error to users to tell them base url format is not valid.
Steps to Reproduce
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: