最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

not able to modify errorType from error object in mule 4 - Stack Overflow

programmeradmin0浏览0评论

I want to modify error.errotType to something else. How can I do that? I do not see any option to update error object in Mule 4. Also why in 'raise-exception', type field can not be set dynamically i.e. through dataweave expression?

I want to modify error.errotType to something else. How can I do that? I do not see any option to update error object in Mule 4. Also why in 'raise-exception', type field can not be set dynamically i.e. through dataweave expression?

Share Improve this question edited Feb 6 at 14:55 aled 25.7k4 gold badges31 silver badges46 bronze badges asked Feb 6 at 14:46 Vatsal MehtaVatsal Mehta 1152 silver badges19 bronze badges 2
  • 1 This feels to be an XY Problem. You should provide more details into what are you trying to achieve by changing the error type. What is the original problem you are trying to resolve? Also don't ask multiple questions in one in Stack Overflow. Open separate questions, one for each. – aled Commented Feb 6 at 14:58
  • Also showing a concrete example would be helpful to understand the context. – aled Commented Feb 7 at 15:12
Add a comment  | 

1 Answer 1

Reset to default -1

Error Object in Mule 4 is immutable and you will not able to modify it,you have such component like raise-error to throw your own custom namespace and identifier based on immutable exception Object choice condition.

But in type field you can not directly exact DataWeave as it is not a f(x) enabled component but you can use string eval like below. Do check below as I have not tested.

"$(vars.something)"
发布评论

评论列表(0)

  1. 暂无评论