code: func statusCodeFromGRPCError(err error) int {
  	switch status.Code(err) {
  	case codes.InvalidArgument: // code 3
  		return http.StatusBadRequest
  	case codes.NotFound: // code 5
  		return http.StatusNotFound
  	case codes.AlreadyExists: // code 6
  		return http.StatusConflict
  	case codes.PermissionDenied: // code 7
  		return http.StatusForbidden
  	case codes.FailedPrecondition: // code 9
  		return http.StatusBadRequest
  	case codes.Unauthenticated: // code 16
  		return http.StatusUnauthorized
  	case codes.OutOfRange: // code 11
  		return http.StatusBadRequest
  	case codes.Unimplemented: // code 12
  		return http.StatusNotImplemented
  	case codes.Unavailable: // code 14
  		return http.StatusServiceUnavailable
  	default:
  		if e, ok := err.(causer); ok {
  			return statusCodeFromGRPCError(e.Cause())
  		}
  		// codes.Canceled(1)
  		// codes.Unknown(2)
  		// codes.DeadlineExceeded(4)
  		// codes.ResourceExhausted(8)
  		// codes.Aborted(10)
  		// codes.Internal(13)
  		// codes.DataLoss(15)
  		return http.StatusInternalServerError
  	}
  }
docs: // statusCodeFromGRPCError returns status code according to gRPC error