RJ
RJ•9mo ago

Transient error while executing action

I was testing something which involved recursive action execution (run an action, then run it again with scheduler.runAfter(0, ...), until the base case is reached), and I ran into a failure which was logged as Transient error while executing action. What is this? Should I expect it to happen regularly? Do I need to orchestrate some state management/retry scaffolding in order to anticipate the possibility of this occurring?
2 Replies
ian
ian•9mo ago
If you have the request ID we could look up what the exception was, but yes actions can fail due to transient errors like machine restarts, network failures, backend deploys. If your action can be made idempotent then you could use https://stack.convex.dev/retry-actions
Automatically Retry Actions
Learn how to automatically retry actions in Convex while also learning a little about scheduling, system tables, and function references.
RJ
RJOP•9mo ago
No need to look it up if the cause is something mundane and unsurprising, it just looked from my searching on Discord like in past instances this error indicated an unexpected problem. I can in fact make my action idempotent, so I'll look into that! Thanks @ian 🙂