Closed
Description
Subject of the issue
I hit error: "request body too large" when deploying contract
Note that in my case this error has occured after upgrading the tealscript version and algokit which added more comments to the generated client code.
Please increase post body size to the limit where any future build of the contract would rather fail on "teal code too big" instead of the input body is too big.
Also note that Joe fixed the same thing for compiling contract between version of 0.95.0 and 0.95.1 and just removed the comments. But i think the increase of allowed post body in the algod is better solution then to trim comments.
Your environment
algokit localnet status
# algod status
Status: Running
Port: 4001
Last round: 558
Time since last round: 170.8s
Genesis ID: dockernet-v1
Genesis hash: LThUC5TvTwIUgf7bTZNMSZkVdd2iDzCTx4RYNyYQe/M=
Version: 3.24.0
# conduit status
Status: Running
# indexer-db status
Status: Running
# indexer status
Status: Running
Port: 8980
Last round: 558
Version: 3.5.0
Steps to reproduce
- git clone https://github.com/scholtz/BiatecCLAMM
- cd BiatecCLAMM
- git checkout feat/update-tealscript
- algokit localnet start
- npm i
- npm run test
Expected behaviour
If contract is too large i expect to receive contract too large error message.
Actual behaviour
URLTokenBaseHTTPError: Network request error. Received status 400 (Bad Request): http: request body too large
{
response: {
body: { message: 'http: request body too large' },
status: 400,
headers: {
'43': 'content-length',
'application/json; charset=UTF-8': 'content-type',
'Sat, 15 Jun 2024 09:55:00 GMT': 'date',
Origin: 'vary'
},
text: '{"message":"http: request body too large"}\n',
ok: false
},
status: 400
}