【问题标题】:Unable to catch exception in exception strategy Mule ESB无法在异常策略 Mule ESB 中捕获异常
【发布时间】:2016-05-23 17:44:18
【问题描述】:

在 http 连接器中出现以下错误,我需要捕获异常并执行操作

org.mule.module.http.internal.request.ResponseValidatorException: Response code 503 mapped as failure. Message payload is of type: BufferInputStream

以下是我在选择异常中编写的代码

<catch-exception-strategy when="#[exception.causedBy(http.internal.request.ResponseValidatorException)] " doc:name="ResponseValidator Exception Strategy">

但是 catch 块没有捕捉到异常

【问题讨论】:

    标签: exception exception-handling mule-studio anypoint-studio


    【解决方案1】:

    使用 #[groovy:message.getExceptionPayload().getRootException().getMessage()] 检查根异常消息 在默认异常块中并获取根异常详细信息并在您选择的异常策略中使用它

    【讨论】:

      猜你喜欢
      • 2023-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-02
      • 2019-09-25
      相关资源
      最近更新 更多