cosmo
cosmo copied to clipboard
Router panics if it is sent a invalid enum
Component(s)
router
Component version
v0.78.0
wgc version
0.49.1
controlplane version
router version
What happened?
Description
Router panics if it is sent a invalid enum
I have an enum, router went to load it from a subgraph, the subgraph responded with "action":"\a" or "action":"\x0f" (invalid json) instead of "action":"UNKNOWN" and there was a panic: recovered from panic: json: error calling MarshalJSON for type json.RawMessage: invalid character 'a' in string escape code
Steps to Reproduce
Reply from a subgraph of the invalid json.
Expected Result
ok
Actual Result
panic
Environment information
Environment
OS: 14.4 (23E214) Package Manager: npm Compiler(if manually compiled): go version go1.22.1 darwin/arm64
Router configuration
default
Router execution config
No response
Log output
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.