Issue concatenating error.detailsDescription with any string in mule 4

204 Views Asked by At

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

There are 1 best solutions below

0
On

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