          :parser 'json-read)))))
 
 (defun ycmd--handle-exception (results &optional default-handler)
-  (cond ((string-equal (assoc-default 'TYPE (assoc-default 'exception results))
-                       "UnknownExtraConf")
-         (ycmd--handle-extra-conf-exception results))
-        (default-handler (funcall default-handler results))))
+  (let* ((exception (assoc-default 'exception results))
+         (exception-type (assoc-default 'TYPE exception)))
+    (cond ((string-equal exception-type "UnknownExtraConf")
+           (ycmd--handle-extra-conf-exception results))
+          (default-handler (funcall default-handler results)))))
 
 (defun ycmd-goto ()
   "Go to the definition or declaration (whichever is most

                            `((filepath . ,conf-file))))))
    (ycmd-notify-file-ready-to-parse)))

(defun ycmd--handle-buffer-parsing-exception (results)
  "Handle exeption for file already being parsed runtime error."
  (when (and (string-equal (assoc-default 'TYPE (assoc-default 'exception results))
                      "RuntimeError")
             (string-equal (assoc-default 'message results)
                           "File already being parsed."))
    (ycmd--report-status 'parsing)))

(defun ycmd--handle-notify-response (results)
  "If RESULTS is a vector or nil, the response is an acual parse result.

        (deferred:nextc it
          (lambda ()
            (with-current-buffer buff
              (when (ycmd--parsing-buffer-finished-p)
                (ycmd--report-status 'parsed)))))))))

(defun ycmd-display-raw-file-parse-results ()
  "Request file-parse results and display them in a buffer in raw form.
