The effect of this is that failed requests in cc-console result in cryptic "RequestError: Empty message" logs in Datadog. We should either change this function to be more flexible with different types, audit our api v2 apis to make sure they return JSON, or maybe even both.
The
fetchDataJson
function expects non error responses to return Response objects. When they don't, aRequestError
response with undefined fields is created, see: https://github.com/cockroachdb/cockroach/blob/d5f328ea6f3efd8fbe631c97d59f7b74307d22f9/pkg/ui/workspaces/cluster-ui/src/api/fetchData.ts#L115The effect of this is that failed requests in cc-console result in cryptic "RequestError: Empty message" logs in Datadog. We should either change this function to be more flexible with different types, audit our api v2 apis to make sure they return JSON, or maybe even both.
Jira issue: CRDB-44832