starknet-rs icon indicating copy to clipboard operation
starknet-rs copied to clipboard

Handle gateway response errors

Open fracek opened this issue 3 years ago • 2 comments

I noticed that when the gateway returns a "too many requests" error, the error I get from the SequencerGatewayProvider is a deserialization error (because the gateway returns an html page). I propose to add a RateLimit error to ProviderError to cover this case.

fracek avatar Sep 02 '22 10:09 fracek

Yeah makes sense to me, as long as the gateway returns a 429 status code properly.

xJonathanLEI avatar Sep 02 '22 14:09 xJonathanLEI

Our current test setup doesn't include HTTP status code or headers, making something like this hard to test as we can't just use the real gateway. So I will make changes to the test setup first before working on this.

xJonathanLEI avatar Sep 05 '22 06:09 xJonathanLEI