#SalesforceSummer25 [Tip 28] - Add ‘Has Error’ Assertions to Flow Tests for Better Error Handling

#1MinuteTip #SalesforceSummer25 You can now add “Has Error” as an operator in Flow Test assertions. This allows you to explicitly check whether a specific flow element caused an error during a test run. If the element encounters an error and your assertion is expecting it (e.g., Has Error = True), the test will pass. If no error occurs and one is expected—or vice versa—the test fails.

Select the Has Error operator to configure negative assertions for Create Records, Update Records, Delete Records, and Action elements.

This is extremely useful when you’re testing error scenarios and want to validate that your flow behaves correctly when things go wrong.

(Not familiar with Flow tests yet? Check out our #Step by Step Guide to Automate Testing of Salesforce Flows Declaratively)

Product Area: Flow

References & Useful URLs



Found this tip helpful? Click ❤️ to let us know! Your feedback helps us create more tips like this that matter to you.