Fail test if request in Before flow fails
See original GitHub issueDescribe the solution you’d like
If a request in the Before
flow fails, I would like the test to fail. This can be done by adding for each request in the before flow an optional parameter such as allow_failure: false
while the default value would be true
. If a request with the allow_failure: false
fails, then fail the test; otherwise proceed.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Error handling steps, counters, a new flow details experience ...
With error handling, you can define any number of steps to run after the failure of an action. This powerful new feature will...
Read more >Other Examples of Error Handling in Flows - Salesforce Help
Request Corrections from Users: Draw a fault connector to a Screen element, where users can verify the values that they entered, make corrections,...
Read more >Unit Testing Delays, Errors & Retries with Kotlin Flows - Medium
In our Repository, when an error occurs, we delay for 1 second before executing the flow block again. As we have delays in...
Read more >Common Salesforce Flow Errors and How to Troubleshoot Them
If your flow is running in user mode, an error will be returned. How do you know which context your flow is running...
Read more >How to Solve Salesforce Flow Errors
To avoid hitting a 'fault' altogether, you can use a Decision to check specific criteria before proceeding and loop the user back around...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It can be also implemented using the processors feature:
For example:
function throwErrorOnError(requestParams, response, context, ee, next) { if (response.statusCode !== 200 || response.statusCode !== 201 || response.statusCode !== 204){ throw new Error('Stopping test'); } }
We will need to catch this errors and notify predator that test was aborted. Adding it to 1.3.0
I suggest aborting the test if a capture fails in the ‘before’ section Change need to be done in predator-runner