code: func replyError(c context.Context, rw http.ResponseWriter, err error, msg string, args ...interface{}) {
  	code := http.StatusBadRequest
  	if transient.Tag.In(err) {
  		code = http.StatusInternalServerError
  	}
  	msg = fmt.Sprintf(msg, args...)
  	logging.Errorf(c, "HTTP %d: %s", code, msg)
  	http.Error(rw, msg, code)
  }
docs: // replyError logs the error and replies with HTTP 500 (on transient errors) or
  // HTTP 400 on fatal errors (that can happen only on bad requests).