0xSpaceShard / starknet-devnet-rs

A local testnet for Starknet... in Rust
https://0xspaceshard.github.io/starknet-devnet-rs/
MIT License
100 stars 56 forks source link

Error message on too big request could be more informative #505

Open FabijanC opened 1 month ago

FabijanC commented 1 month ago

This is printed if the declaration request body is too big:

error WARN rpc: invalid request err=BytesRejection(FailedToBufferBody(LengthLimitError(LengthLimitError(Error { inner: LengthLimitError })))) when I try to declare my contract in localhost. with sncast. And sncast throws error error: Unknown RPC error: data did not match any variant of untagged enum JsonRpcResponse: data did not match any variant of untagged enum JsonRpcResponse

Originally reported on Discord (original post). The issue was resolved promptly.

Ideally we would tell users to use --request-body-size-limit without them reporting an issue. The user reported getting this with sncast; perhaps that client is just not properly parsing our response, but maybe the warning log could be improved in that case.