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

Handle error and incorrect responses from upstreams #233

Open
taxmeifyoucan opened this issue Mar 23, 2023 · 0 comments
Open

Handle error and incorrect responses from upstreams #233

taxmeifyoucan opened this issue Mar 23, 2023 · 0 comments

Comments

@taxmeifyoucan
Copy link

When user calls Dshackle with a wrong request and any upstream doesn't respond, Dshackle returns an error, e.g. code":-32002,"message":"No response or no available upstream... However, when it forwards the request to an upstream and receives any kind of text response, it seems to somehow use this data to respond to user. This often happens with remote/public upstreams, not when directly connected to a node.

For example, when Dshackle is pointed to an upstream which is behind another Dshackle instance and receives previously mentioned error as a response, it actually responds to user with incorrect and seemingly random values coming from this text.

Dshackle should be able to recognize an incorrect format of the response, detect there is an error and discard it as no response from the upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant