We want to return a specific error message when the host we are trying to send our request is a non-existing DNS and can't be resolved.
The problem is Apigee doesn't have a specific error for this, Apigee just says "Error writing request to target", and we understand this can happen in other circumstances different from a non existing DNS.
We can see in Trace a property "error.cause" which shows exactly what we want to identify this error:
But we are having troubles to access this property on runtime, it seems like it's not accesible.
Please can you tell us if is there a way of accessing that "Host not reachable" value, or any other way to unambiguously identify the unresolved DNS error?
Is there a solution for this ? For some of the network related errors, it would make sense to send the actual error instead of generic - Service Unavailable error. The exact error(error.cause variable) can be seen in the trace under the edge-generated fault handling conditional policies in run time , but doesn't seem to be accessible.
It seems there's no solution for now.
any suggestion on this topic? @dchiesa1 @DChiesa2023 ?
is it possible to access the following variables?
error.class
error.cause
error.state