code: func DecodeDebugInfo(err error, meta metadata.MD) error {
  	if len(meta) == 0 {
  		return err
  	}
  	encoded, ok := meta[DebugReportMetadata]
  	if !ok || len(encoded) != 1 {
  		return err
  	}
  	data, decodeErr := base64.StdEncoding.DecodeString(encoded[0])
  	if decodeErr != nil {
  		return err
  	}
  	var raw trace.RawTrace
  	if unmarshalErr := json.Unmarshal(data, &raw); unmarshalErr != nil {
  		return err
  	}
  	if len(raw.Traces) != 0 && len(raw.Err) != 0 {
  		return &trace.TraceErr{Traces: raw.Traces, Err: err, Message: raw.Message}
  	}
  	return err
  }
docs: // DecodeDebugInfo decodes debug information about error
  // from the metadata and returns error with enriched metadata about it