        :parser 'json-read
        :sync sync))))
 
-(defun ycmd--handle-exception (request-type result)
-  "Handle exception for REQUEST-TYPE in completion RESULT.
+(defun ycmd--handle-exception (result)
+  "Handle exception in completion RESULT.
 
 This function handles `UnknownExtraConf', `ValueError' and
 `RuntimeError' exceptions."

  "Function to run if server request resulted in exception.

This hook is run whenever an exception is thrown after a ycmd
server request.  Two arguments are passed to the function, a
string with the type of request that triggerd the exception and
the server response structure which looks like this:

  ((exception
    (TYPE . \"RuntimeError\"))

      ("UnknownExtraConf"
       (ycmd--handle-extra-conf-exception .exception.extra_conf_file))
      ((or "ValueError" "RuntimeError")
       (ycmd--handle-error-exception .message)))))

(defun ycmd--send-request (type success-handler)
  "Send a request of TYPE to the `ycmd' server.
