code: func errorCode(err error) codes.Code {
  	switch errors.Unwrap(err) {
  	case context.DeadlineExceeded:
  		return codes.DeadlineExceeded
  
  	case context.Canceled:
  		return codes.Canceled
  
  	default:
  		return grpc.Code(err)
  	}
  }
docs: // errorCode returns a most appropriate gRPC code for an error