cowprotocol / cow-sdk

CoW protocol SDK
https://docs.cow.fi/cow-protocol/reference/sdks/cow-sdk
Other
31 stars 9 forks source link

[Polling tests] Add Handle unexpected errors #162

Closed anxolin closed 1 year ago

anxolin commented 1 year ago

Normally, validations, if done right, will catch all errors and return a comprehensive error.

This is why, by the time we do the call to getTradeableOrderWithSignature we will have quite some certainty the call will succeed. If it doesn't we will consider it an UNEXPECTED_ERROR and will return the original error with the result.

This PR adds a unit test to validate we get this result in this situation.

github-actions[bot] commented 1 year ago

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request