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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json from 500 errors from rpcs is parsed #597

Open
novalis opened this issue Apr 29, 2022 · 5 comments
Open

json from 500 errors from rpcs is parsed #597

novalis opened this issue Apr 29, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@novalis
Copy link
Contributor

novalis commented Apr 29, 2022

Describe the bug
500 errors from tezos node rpcs are not actually retried:

# server side errors 5xx can pass for a retry

This says "server side errors 5xx can pass for a retry". But a retry is not what happens -- the body of the 5xx response is returned.

To Reproduce

I discovered this while working on #596 -- but you could just point tezos_node_addr to an endpoint that returns 500 for queries to e.g. /chains/main/blocks/\d+/context/selected_snapshot?cycle=\d+.

Expected behavior
I would expect these queries to either cleanly fail, or to get retried (and then cleanly fail). But instead, the 500 response is parsed as json (which, in the case of errors from tezos, it is), and returned to the caller, causing an unclean error later on.

@novalis novalis added the bug Something isn't working label Apr 29, 2022
@novalis novalis changed the title json from 500 errors from rpcs is parced. json from 500 errors from rpcs is parsed Apr 29, 2022
@jdsika jdsika added this to the v11.0 (Ithaca) milestone Jun 2, 2022
@jdsika jdsika closed this as completed Jun 2, 2022
@novalis
Copy link
Contributor Author

novalis commented Jun 2, 2022

When was this completed? I don't see it in !581.

@jdsika
Copy link
Contributor

jdsika commented Jun 2, 2022

Did I misinterpret something? I thought you solved it in #596 and it was merged into #581 by Nicolas and I just merged it into master?

@jdsika
Copy link
Contributor

jdsika commented Jun 2, 2022

ahhhh, you discovered it in #596

sorry, reopening

@jdsika jdsika reopened this Jun 2, 2022
@jdsika jdsika modified the milestones: v11.0 (Lima), v11.5 (Lima) Dec 18, 2022
@rvermootenct
Copy link
Contributor

Hey there @novalis, I tried to reproduce this issue, but may be missing something here. Is it possible you were getting a 4xx error? If I ensure it's a 5xx error it indeed does retry. Can you confirm for me?

@novalis
Copy link
Contributor Author

novalis commented Jan 31, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants