code: func WriteError(err error, w http.ResponseWriter) error {
  	var status int
  	switch grpc.Code(err) {
  	case codes.NotFound:
  		status = http.StatusNotFound
  	case codes.ResourceExhausted:
  		// We only expect to hit this if there is a DoS, so we just wait the full TTL.
  		// If this is ever hit in steady-state operations, consider increasing the maxInFlight requests,
  		// or plumbing through the time to next expiration.
  		w.Header().Set("Retry-After", strconv.Itoa(int(cacheTTL.Seconds())))
  		status = http.StatusTooManyRequests
  	default:
  		status = http.StatusInternalServerError
  	}
  	w.WriteHeader(status)
  	_, writeErr := w.Write([]byte(err.Error()))
  	return writeErr
  }
docs: // WriteError translates a CRI streaming error into an appropriate HTTP response.