code: func (h *TextWriter) WriteErrorCode(w http.ResponseWriter, r *http.Request, code int, err interface{}) {
  	e := toError(err)
  	if err == nil {
  		err = e
  	}
  
  	if code == 0 {
  		code = http.StatusInternalServerError
  	}
  
  	// All errors land here, so it's a really good idea to do the logging here as well!
  	h.Reporter(h.logger, "An error occurred while handling a request")(w, r, code, e)
  
  	w.Header().Set("Content-Type", h.contentType)
  	w.WriteHeader(code)
  	fmt.Fprintf(w, "%s", err)
  }
docs: // WriteErrorCode writes an error to ResponseWriter and forces an error code.