I want to retry an HTTP request only if the error is a timeout error otherwise the existing error handlers should handle the error What I am using now as a solution is a try scope inside the until successful scope and propagate the error if it is a timeout and on-error continue if it is another type of error, but this solution does not transfer error handling to the flow's error handler (the on-error continue http:intenalservererror)
Asked
Active
Viewed 394 times
1
-
Please use text instead of images. See https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question for more details on the reason. For Mule flows use the XML as text. – aled Oct 31 '22 at 11:24
-
1Unfortunately this is the only option. Only thing you can add here is to set a variable that will hold the `error` object in your on-error continue and then validate that this error object should be empty. Similar approach is mentioned in [this article](https://mulesy.com/retry-in-mule-4/) – Harshank Bansal Nov 01 '22 at 10:14
1 Answers
0
That will not work because the until successful scope will consume the error so it will not reach the outer error handler. You should put error handling inside the until successful scope, in the on propagate branch of the try.

aled
- 21,330
- 3
- 27
- 34