Closed wangyuehong closed 6 days ago
Thank you for the detailed report. @jhump should this be added to conformance suite?
@jhump should this be added to conformance suite?
That's probably a good idea. The well-known types seem to always be causing problems :(
Describe the bug
After https://github.com/connectrpc/connect-go/pull/688 was merged into connect-go, the debug field in error details is not consistently an object but can be any JSON type.
Error JSON produced by connect-go v1.14.0 and earlier:
The same error JSON from connect-go v1.15.0:
The current code in connect-es expects the debug field to be an object, so the new error JSON format cannot be handled after connect-go v1.15.0.
https://github.com/connectrpc/connect-es/blob/e5804707c64a2a1c3cfc6a12753047ee274215e3/packages/connect/src/protocol-connect/error-json.ts#L65
To Reproduce Return the following error in a connect-go server:
Expected error:
Actual error:
Environment (please complete the following information):
1.4.0
v1.5.0
and later.Additional context This code might fix the issue, but I am not familiar with TypeScript, so I am just reporting it: