1
votes

While handling error in mule 4, I tried using:

%dw 2.0
output application/java
---

"Hello Team"
 
"Recodarti Order export job failed error is " ++ error.detailedDescription ++ 
 
"REP Sap Code is NULL please reverify the data and reprocessed the interface. 
Thank You"

but I'm getting a scripting error in the console. How can I concatenate a string with error.detailsDescription?

1

1 Answers

1
votes

Its possibly happening due to the incorrect script declaration.

Try below

%dw 2.0
output application/java
---
"Hello Team \nRecodarti Order export job failed error is " ++ error.detailedDescription ++ "REP Sap Code is NULL please reverify the data and reprocessed the interface. \nThank You"

output

Hello Team 
Recodarti Order export job failed error is xxx REP Sap Code is NULL please reverify the data and reprocessed the interface. 
Thank You