cosmo
cosmo copied to clipboard
allow custom module get subgraph error
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
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.
Hi @biubiubiuboomboomboom, thanks for raising the issue. We will take a look and get back to you.
ok , i'm happy to submit a PR to resolve this if it sounds good to you.