make error handler: How to use commit to abort work after an error

error handler Commit is a feature designed to keep previously completed workand abort post-error workwhen an error occurs during the execution of a task. it is primarily used to ensure data integrity, and when you need to ensure that successfully processed data is not lost.

What Commit does

  1. maintain work before the error
    • actions that were successfully completed before the error are reflected in the database.
    • example: If an email is sent successfully, even if an error occurs afterward, the sent email is retained.
  2. abort post-error actions
    • the steps after the error are not executed.
    • example: If an error occurs during an inventory update after a successful payment, then the payment is retained, but the inventory update is not executed.
  3. data preservation
    • if sensitive data has already been processed, then it is preserved without restoring it.
    • example: if some customer records have been saved, but the remaining work is aborted.

When to use Commit

1. when you need to maintain data integrity

  • when you need to preserve data that has already been successfully processed without reverting it.
  • for example: sending an email, authorizing a payment, etc.

2. when you need to save intermediate results

  • when some successful actions are independent of the next step.
  • example: an error saving the database after a customer email has been sent.

3. when partial success is acceptable

  • when the results of a previous action are useful even if not all actions are successful.
  • example: processing a large amount of data and only part of the data is successfully processed.

Real-world use cases for Commit

example 1: Database save error after sending an email

  1. workflow
    • send an email to a customer → Save email sending history to database.
  2. error situation
    • after sending the email successfully, an error occurs while saving the database.
  3. Commit behavior
    • the email has already been sent, so keep it as is.
    • save database fails, so abort further steps.

example 2: Inventory update error after payment authorization

  1. workflow
    • process customer payment → Update inventory → Send order confirmation email.
  2. error situation
    • error updating inventory.
  3. Commit action
    • payment completed successfully, so keep.
    • inventory update fails, and no order confirmation email is sent.

example 3: Data synchronization system

  1. workflow
    • import data from external database → Synchronize to internal system.
  2. error situation
    • after synchronizing some data, interrupted by a network error.
  3. Commit behavior
    • synchronized data kept, rest of data not synchronized.

How to set up Commit (on Make.com)

모둘 선택 후 오른쪽 버튼 클릭 후 add error handler 클릭 후 오류 처리기를 선택할 수 있습니다.
  1. add an error handler
    • On the Edit Workflow screen in Make.com, select the module where an error is likely to occur.
    • add an error handlerto that module.
  2. Select the Commit option
    • in the error handler, select the “Commit” option.
    • this sets it to keep the results of the previous action.
  3. save and test
    • after completing the setup, test the scenario to ensure that Commit works correctly when an error occurs.

Cautions when using Commit

  1. check your data dependencies
    • make sure that the results of previous actions are independent of the next step.
    • if your work is highly dependent, Rollback may be more appropriate.
  2. avoid data loss
    • Be careful, as incorrect commit settings can cause unintentional data loss.
  3. keep a history of your work
    • Set up to keep a log of your actions after Commit so that you can analyze issues.

Commit summary

itemdescription
rolepreserves previous work and aborts subsequent work when an error occurs.
use casesfailure to save the database after sending an email, failure to update inventory after authorizing a payment, etc.
precautionscheck data dependencies and ensure that no unintentional data loss occurs.
examplefailure to save the database after a successful customer email, retaining payment information when an inventory update fails.

Commit is very useful in situations where you need to preserve the results of intermediate actions while maintaining data integrity. It’s easy to set up, especially on automation platforms like Make.com, and is a powerful option for handling errors efficiently.

Content View