> For the complete documentation index, see [llms.txt](https://docs.jetadmin.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jetadmin.io/workflow/handle-outcomes/handle-failures-and-prevent-duplicate-processing.md).

# Handle failures and prevent duplicate processing

A failed run may already have completed earlier actions. Before running it again, determine which effects occurred.

## Diagnose before retrying

1. Open the failing step and read the error in the test panel.
2. Inspect the identifier and fields passed into the step.
3. Check whether previous steps wrote records or sent notifications.
4. Correct the input, access, or configuration problem.
5. Test the affected path with a fictional record.

See [Test steps and complete workflows](/workflow/test-and-troubleshoot/test-steps-and-complete-workflows.md). Do not assume a failure rolls back earlier operations or that testing is a dry run.

## Design for repeated events

Schedules can select the same records again, and an external sender can deliver an event more than once. Choose a stable key, such as a ticket ID plus the type of reminder, or an event ID supplied by the sender.

A common application-level pattern is:

1. Look up whether that key has already been processed.
2. Skip completed work.
3. Perform the intended action.
4. Save a processed marker after success.

This is a design pattern you implement in your data and workflow, not an automatic guarantee. A lookup followed by a write can race if two runs overlap. For strict duplicate prevention, use a unique constraint or atomic operation supported by your data source.

## Account for partial success

If a message was sent but saving the processed marker failed, rerunning can send it again. Inspect the external service's result and use an idempotency key when that service supports one.

Do not assume Jet Admin or a connector retries automatically. Check the behavior of the actual trigger and operation before relying on it.

## Test the edge cases

Test the same event twice, a missing record, a denied operation, and a failure after an earlier successful step. Confirm both the displayed result and the final data.

For button feedback, configure [component success and error actions](/workflow/handle-outcomes/component-success-and-failure-actions.md). For recurring work, see [scheduled reminders](/workflow/practical-guides/send-scheduled-reminders.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jetadmin.io/workflow/handle-outcomes/handle-failures-and-prevent-duplicate-processing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
