Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Propagation from Subgraphs to Supergraph #825

Open
IsabelFreitas-catapult opened this issue Jun 18, 2024 · 1 comment
Open

Error Propagation from Subgraphs to Supergraph #825

IsabelFreitas-catapult opened this issue Jun 18, 2024 · 1 comment
Labels
internally-reviewed Internally reviewed

Comments

@IsabelFreitas-catapult
Copy link

IsabelFreitas-catapult commented Jun 18, 2024

I would expect errors from subgraphs to be propagated to the federated server, but this does not seem to be the case.

In my set up all my subgraphs require headers to be provided as part of the request, so I have a middleware function that checks for the presence of the headers and if they are not present it returns an error.

When headers are missing I see a nice error in the subgraph log Error: service missing request headers: X-Customer-Is : or X-SOB : are not provided in the headers. However this is not propagated to the federation graph.

Is there a way of doing this? i.e. intercepting the error from the subgraph and logging it in the federation layer?

@StarpTech
Copy link
Collaborator

Hi @IsabelFreitas-catapult we have support for this. Please take a look at https://cosmo-docs.wundergraph.com/router/subgraph-error-propagation and let us know if it solves your issue.

@StarpTech StarpTech added the internally-reviewed Internally reviewed label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internally-reviewed Internally reviewed
Projects
None yet
Development

No branches or pull requests

2 participants