400 Bad Request: BadJsonBody: Failed to Buffer the request body: length limit exceeded
anybody ever see this issue?
8 Replies
Side note - would love for an exception like this to explain potential causes/remedies. Thanks!
Hi @em_errata — we can improve the error message here or increase there file size limit here, possibly both.
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.
Cool, yeah was going to suggest you might be able to make the schema file smaller by not importing so much from it
having relocated that logic to separate files + making the schema declaration only depend on exports from
./convex
namespace, was sufficient.Great to hear that worked, sounds like something we should put in the error message and/or link to docs about.
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!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.