Skip to content

fix: handle websocket subscription error responses before result parsing#418

Open
tanmay4l wants to merge 1 commit into
solana-foundation:mainfrom
tanmay4l:ws-error
Open

fix: handle websocket subscription error responses before result parsing#418
tanmay4l wants to merge 1 commit into
solana-foundation:mainfrom
tanmay4l:ws-error

Conversation

@tanmay4l
Copy link
Copy Markdown
Contributor

This fixes a websocket bug where subscribe responses with an error field were not handled correctly.
Now we detect RPC errors first, close that subscription with the real error, and avoid mis-parsing result.
Also added a regression test for this exact case.

Copy link
Copy Markdown
Contributor

@sonicfromnewyoke sonicfromnewyoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me looks good, after some fixes of tests will be good to merge, i believe

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

Successfully merging this pull request may close these issues.

2 participants