cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

allow custom module get subgraph error

Open biubiubiuboomboomboom opened this issue 3 months ago • 3 comments

Component(s)

router

Is your feature request related to a problem? Please describe.

Currently, all subgraph access logs are at the INFO level, which makes it impossible for us to identify problematic subgraphs based on the log level.

We want to print an error log with the ERROR level when a subgraph throws an error.

However, if we print it in a custom module, we have to re-parse the entire response—this is because requestCtx.error is a private variable and cannot be accessed by custom module. Doing so, though, will have a negative impact on performance.

Describe the solution you'd like

add get requestCtx.error function or allow setting access log level when subgraph error not is empty .

add a function to get requestCtx.error, or allow setting the access log level when the subgraph error is not empty .

Describe alternatives you've considered

No response

Additional context

No response

biubiubiuboomboomboom avatar Aug 20 '25 03:08 biubiubiuboomboomboom

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.

github-actions[bot] avatar Aug 20 '25 03:08 github-actions[bot]

Hi @biubiubiuboomboomboom, thanks for raising the issue. We will take a look and get back to you.

JivusAyrus avatar Sep 02 '25 09:09 JivusAyrus

ok , i'm happy to submit a PR to resolve this if it sounds good to you.

biubiubiuboomboomboom avatar Sep 02 '25 09:09 biubiubiuboomboomboom