daun
daun12mo ago

Error instance is not propagated between action and internal mutation.

Hi, it seems my error instance is not propagated between action and internal mutation. This only happens in production environment, not in development environment. Description: The action triggers internal mutation and internal mutation can throw an ConvexError. Action (would normally) catches ConvexError and handle it using .data inside. Do you have any idea to fix this?
No description
9 Replies
daun
daunOP12mo ago
This is code that I used to catch error
No description
Michal Srb
Michal Srb12mo ago
Hey @daun , in prod you're seeing that the else branch is taken? (this is not clear from the provided screenshots) I tried to repro but could not repro. Are you sure the mutation isn't throwing something else than ConvexError in prod? (I'm not sure whether your first screenshot comes from prod logs)
daun
daunOP12mo ago
Yes in prod, else branch is taken. After internalMutation raised ConvexError, the error is propagated as ServerError.
No description
No description
Michal Srb
Michal Srb12mo ago
Are you on the latest version of Convex? That would be 1.7.1
daun
daunOP12mo ago
It's 1.7.1.
Michal Srb
Michal Srb12mo ago
Could you share more of your code? I cannot reproduce the issue. You can DM me here on discord. Thank you, I can reproduce the issue now We're working on a fix, it won't require changes on your side
daun
daunOP12mo ago
Thanks so much!
Michal Srb
Michal Srb12mo ago
We're planning to deploy a fix for this tomorrow This has been fixed, thanks for reporting @daun and apologies for the inconvience caused!
daun
daunOP12mo ago
Thanks!

Did you find this page helpful?