ampp
ampp2d ago

Try Catch not working on http actions

I have a http action that has a try catch wrapping ctx.runMutation() and i know i don't have any downstream try catches in any mutation yet i can't catch the error. When i run functions through the frontend nextjs the try catch in nextjs catches these errors. Is there any tricks that help figure this out?
4 Replies
Convex Bot
Convex Bot2d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ian
ian2d ago
What errors are you seeing this for? Is this an error in the mutation body, a system error?
ampp
amppOP2d ago
mutation body like with Uncaught ConvexError: test im just manually throwing but ive seen it with logic errors too.. it is 7 mutation ts functions deep within my event system (no submutations) Tempted to have the http action call a action and see if that structure catches it.
ian
ian22h ago
I just made a sample app with an http action that called an internal mutation that threw, and I was able to catch the error. If you can get a minimal repro of the issue and share it, that would be helpful

Did you find this page helpful?