
Convex component for retrying idempotent actions.
The Convex Action Retrier is a powerful component designed to streamline error handling for actions that may fail due to various factors such as network issues or server restarts. With its focus on ease of use and robustness, it provides a straightforward solution to retry failed actions with customizable backoff strategies. Whether you're dealing with third-party API fatigue or intermittent server hiccups, this tool aims to enhance the reliability of your Convex projects.
Implementing the Action Retrier can significantly improve the resilience of your application. By managing retries automatically, the component minimizes not only the manual overhead of error handling but also enhances the user experience by ensuring that critical actions are performed successfully over time.
Exponential Backoff: Automatically retries failed actions with an adjustable backoff strategy, minimizing excessive load on the server.
Configurable Parameters: Customize the initial backoff delay, base for exponential growth, and maximum retries to fit your specific application needs.
Run Management: Easily start, query, or cancel actions through a simple run method, providing clear control over action status.
Mutation Callbacks: Optionally include a mutation callback that runs exactly once upon action completion to perform any necessary follow-up logic.
Efficient Cleanup: Automatically handles storage of completed runs and provides a method to clean up runs immediately, maintaining a tidy database.
Logging Options: Control the verbosity of internal logs, allowing for better tracking and debugging via different log levels such as DEBUG or ERROR.
Integration-ready: Designed specifically for use within Convex projects, seamlessly integrating with its serverless functionality and effortless setup.

Convex is a fullstack TypeScript development platform that provides a reactive database, serverless functions, and real-time sync out of the box. It simplifies backend development with automatic caching, optimistic updates, and type-safe queries.
ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.
TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.