Handle Fault Rule for "messaging.adaptors.http.flow.ApplicationNotFound"

Hello friends, i'm a beginner in APIGEE. I want to show custom RaiseFault instead of following default error thrown by APIGEE, incase if proxy endpoint is incorrect:

{
    "fault": {
        "faultstring": "Unable to identify proxy for host: default and url: XXX",
        "detail": {
            "errorcode": "messaging.adaptors.http.flow.ApplicationNotFound"
        }
    }
}

I tried found fault rule for handling exception, but RF not triggering.

 <Step>
          <Condition>adaptors.http.flow.ApplicationNotFound.failed = true</Condition>
           <Name>RF-AppNotFound</Name>
            </Step>

thanks,

0 2 2,751
2 REPLIES 2

Are you trying to raise an error for the invalid proxy path?

In your case, RF will not trigger because Apigee is not even entering your proxy.

Maybe you need to create another default proxy flow for your non-matching case, this can include a raise fault policy to give a custom error.

Not sure, but I think you might want a FaultRule, with a Condition something like

  <FaultRule name="Rule1">
    <Step>
      <Condition>fault.name = "ApplicationNotFound"</Condition>
      <Name>AM-AppNotFound</Name>
    </Step>
    ...

See this doc page for some hints.

Also: don't use RaiseFault in FaultRules. Just use AssignMessage.