em_errata
em_errata16mo ago

400 Bad Request: BadJsonBody: Failed to Buffer the request body: length limit exceeded

anybody ever see this issue?
No description
8 Replies
em_errata
em_errataOP16mo ago
Side note - would love for an exception like this to explain potential causes/remedies. Thanks!
ballingt
ballingt16mo ago
Hi @em_errata — we can improve the error message here or increase there file size limit here, possibly both.
em_errata
em_errataOP16mo ago
Okay - I think that this was the result of attempting to co-locate client-end validation logic + using external libraries that weren't being tree-shaken from the schema bundle.
ballingt
ballingt16mo ago
Cool, yeah was going to suggest you might be able to make the schema file smaller by not importing so much from it
em_errata
em_errataOP16mo ago
having relocated that logic to separate files + making the schema declaration only depend on exports from ./convex namespace, was sufficient.
ballingt
ballingt16mo ago
Great to hear that worked, sounds like something we should put in the error message and/or link to docs about.
em_errata
em_errataOP16mo ago
I'm definitely open to the likelihood that this practice is already discouraged somewhere in the docs( - I would anticipate seeing something like this in the zen portion - if that's at all helpful feedback) Appreciate your responsiveness!
ballingt
ballingt16mo ago
Yep this is helpful, thank you! Making the schema bundle smaller is a nice idea because this will make pushes slightly faster, but isn't a fundamental rule in Convex. We'll document that schema is bundled separately in a new bundling section of the docs coming soon.

Did you find this page helpful?