code: func HTTPError(w http.ResponseWriter, logMsg string, err string, errCode int) {
  	if logMsg != "" {
  		log.Println(logMsg)
  	}
  
  	http.Error(w, err, errCode)
  }
docs: // HTTPError is a convenience method for logging a message and writing the provided error message
  // and error code to the HTTP response.