go data_error ai_generated true

rpc error: code = Unknown desc = malformed status: no status details

ID: go/grpc-status-details-missing

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2024-01-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
1.0 active

Root Cause

Server returns a status with no details, but client expects google.rpc.Status details, causing proto unmarshal failure.

generic

中文

服务器返回的状态没有详情,但客户端期望 google.rpc.Status 详情,导致 proto 反序列化失败。

Workarounds

  1. 90% success
    if s, ok := status.FromError(err); ok { for _, d := range s.Details() { /* handle */ } }
  2. 80% success
    st := status.New(codes.Unknown, "error"); st, _ = st.WithDetails(&errdetails.ErrorInfo{}); return st.Err()

Dead Ends

Common approaches that don't work:

  1. 70% fail

    Server logs show no error because the status is intentionally empty; issue is in client-side parsing.

  2. 90% fail

    Credentials are not the issue; the problem is in the status detail parsing logic.