starknet-rs
starknet-rs copied to clipboard
Handle gateway response errors
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.
Yeah makes sense to me, as long as the gateway returns a 429 status code properly.
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.