@apollo/gateway overrides downstream service error codes with
executeQueryPlan.ts. It does so on purpose and I assume there is a good reason for doing so. We’d like for downstream service error codes and messages to surface up instead of this
DOWNSTREAM_SERVICE_ERROR, and I’m thinking we could do it with a
formatError function by looking at the
originalError if available and using the code and message from it.
So, what is the rationale for overriding service errors with
DOWNSTREAM_SERVICE_ERROR, and would there be any reason why surfacing service errors not be a good idea?