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

Add a way to silence the message "Weird... Response for not a thing we sent" #3982

Closed
kashirin-dm opened this issue Apr 17, 2023 · 5 comments
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@kashirin-dm
Copy link

Describe the Feature

I am currently testing various providers using ethers.js v6 and when I access one of the providers I keep getting a "Weird... Response for not a thing we sent" message.
I know the reason for this message (I'm running into provider restrictions) and I don't want this message to constantly appear in my console (thousands of messages in minutes), but in the code, it's just console.log() and I can't silence this message in any way.

I would like this message to have some level like console.debug() or an alternative way to silence this message.

Code Example

No response

@kashirin-dm kashirin-dm added the enhancement New feature or improvement. label Apr 17, 2023
@ricmoo ricmoo added on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6 labels Apr 17, 2023
@ricmoo
Copy link
Member

ricmoo commented Apr 17, 2023

This sounds absolutely like a bug. I’ll get in out in the next patch release.

@ricmoo
Copy link
Member

ricmoo commented Apr 19, 2023

I just looked up that error. It is something that needs some way of signalling. I will add it as an "error" event in the next minor bump.

Basically, it means the provider is sending back a response to a request that was never made. For example, it seems to be responding with an id="5" even though there was never a request made with id="5".

How are you able to trigger this?

@kashirin-dm
Copy link
Author

I was accessing the Nodereal provider's endpoint using the free pricing plan. This plan has a rate limit per second that is 2 times lower than the number of transactions needed to extract data from the mempool. As a result, the success rate of the requests was about 60%, and in the remaining 40% of cases, I received a lot of console messages.

You can replicate this by using their free pricing plan.

@Madjarx
Copy link

Madjarx commented May 18, 2023

I am encountering this issue also, because im testing my system using Alchemy's API, If you need help silencing this error let me know. Maybe as a workaround make a logger function of a sort?

Btw same with my thing, 50% of the time i get a bunch of these messages, looks like this

image

@ricmoo
Copy link
Member

ricmoo commented May 20, 2023

Fixed in v6.4.0.

Now an "error" event is emitted instead, for those that care to be informed and the console is left alone. :)

Thanks! :)

@ricmoo ricmoo closed this as completed May 20, 2023
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels May 20, 2023
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

3 participants