code: func (h *NegotiationHandler) WriteErrorCode(w http.ResponseWriter, r *http.Request, code int, err interface{}) {
  	switch httputil.NegotiateContentType(r, []string{}, "application/json") {
  	case "text/html":
  		h.html.WriteErrorCode(w, r, code, err)
  		return
  	case "text/plain":
  		h.plain.WriteErrorCode(w, r, code, err)
  		return
  	case "application/json":
  		h.json.WriteErrorCode(w, r, code, err)
  		return
  	default:
  		h.json.WriteErrorCode(w, r, code, err)
  		return
  	}
  }
docs: // WriteErrorCode writes an error to ResponseWriter and forces an error code.