cropped-SlicedBread_icon_inversed.png

4.1. Investigating Failures (‘Why did my recipe fail?’)

When a recipe fails, the first step is to identify which slice failed and why. Sliced Bread provides granular logging on every slice to make this process clear.

  1. Start at the “Bread” Record: Navigate to the “Bread” tab and open the parent “Bread” record for your failed job. The “Details” tab is shown by default (ref: 1.83).
  2. Find the Failed “Bread Slice”: Go to the “Bread Slices” related list. Look for slices with a “Failed” status.
  3. Read the “Status Reason”: This field is the most important part of troubleshooting. It contains the exact error message that caused the failure.

Key Troubleshooting Action: “Bread Settings” Override #

Before re-running a failed job, you may need to adjust the execution settings for that specific run without changing the master recipe.

  • Bread Actions Override: From the “Bread” record, you can use the “Bread Actions” button to override recipe-level settings. This is a critical tool for troubleshooting.
  • Example: If a job failed in “Parallel” mode due to record locking, you can use this override to re-run it in “Serial” mode for just that one job, which often resolves the issue. (ref: 1.160)

Common Error Types and Resolutions #

  • Salesforce Validation Rules or Apex Triggers:
    • Error Message: Will often look like FIELD_CUSTOM_VALIDATION_EXCEPTION or CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY and will include the specific error text from your validation rule or Apex trigger.
    • Resolution: This error means the data looks correct to Sliced Bread, but it violates your custom Salesforce business logic.
      • Use the “Go To Record” link on successful slices to compare the good data with the bad.
      • Correct the source data and re-run the failed slices using the “Export Failed Slices” action.
      • Alternatively, adjust your recipe’s “Transform” phase to modify the data to meet the validation criteria before the “Load” phase.
  • “has no file” Error:
    • Error Message: No file found for processing.
    • Resolution: This is common with Inbound Email automation. It means the email handler ran, but no attachment matched the file pattern (e.g., *.csv) set in your Slice rule.
    • If you have multiple recipes listening to the same email service, this error is suppressed as long as at least one recipe finds a matching file (ref: 1.192).
  • Formula or Data Type Mismatches:
    • Error Message: May appear as Invalid decimal or a formula-specific error.
    • Resolution: This often happens in the “Transform” phase.
      • The ISNUMBER formula provides strict validation and will fail on values like +123 or 1.23e4.
      • Review your formula logic (e.g., JSONEXTRACT, REGEXREPLACE) to ensure the data types are compatible.
      • Note that advanced REGEXREPLACE functions, such as those using a backreference (e.g., $1), are supported. If they fail, check your syntax carefully.

Copyright © 2024 all rights reserved, powered by Sliced Bread Software B.V.