Justin
Justin3d ago

Errors testing functions which use action retrier

I have implemented the action retrier in some of my functions, and unit tests for those functions work. However, there are a lot of error logs generated, most of which are not expected. This one is expected as I am testing an error case:
Error executing 10000;runs: Polar API error
But the following I don't expect:
Error when running scheduled function run:execute Error: Could not find module for: "run" ... Run 10000;runs failed, retrying in 595.69 ms: Transient error when executing action ... Error executing 10004;runs: Cannot read properties of undefined (reading 'create') ... Error when running scheduled function run:execute Error: Could not find module for: "run" ...
Does anyone know why this is happening? Should I be expecting all of these error logs or is there a way to prevent this?
2 Replies
ian
ian3d ago
check out the docs on testing components and lmk if that solves it for you docs.convex.dev/components/using
Justin
JustinOP2d ago
Yeah, I'm already doing that
import actionRetrierComponent from "@convex-dev/action-retrier/test";
...
actionRetrierComponent.register(t);
import actionRetrierComponent from "@convex-dev/action-retrier/test";
...
actionRetrierComponent.register(t);
The error logs still show

Did you find this page helpful?