emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/kiwix 885a6c5 166/192: set kiwix-serve not started no r


From: Stefan Monnier
Subject: [elpa] externals/kiwix 885a6c5 166/192: set kiwix-serve not started no response error handling
Date: Sat, 19 Dec 2020 00:41:53 -0500 (EST)

branch: externals/kiwix
commit 885a6c5bab610d2627b7d924760ad4412bf98ba7
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    set kiwix-serve not started no response error handling
---
 kiwix.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/kiwix.el b/kiwix.el
index 0efe368..f4ed9f5 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -220,11 +220,15 @@ Like in function `kiwix-ajax-search-hints'.")
       :type "GET"
       :sync t
       :parser (lambda () (libxml-parse-html-region (point-min) (point-max)))
-      :error (cl-function (lambda (&rest args &key error-thrown 
&allow-other-keys)
-                            (setq kiwix-server-available? nil)
-                            (warn "kiwix.el ping server error: %S" 
error-thrown)))
-      :success (cl-function (lambda (&key data &allow-other-keys)
-                              (setq kiwix-server-available? t)))
+      :error (cl-function
+              (lambda (&rest args &key error-thrown &allow-other-keys)
+                (setq kiwix-server-available? nil)
+                (when (string-equal (cdr (request-response-error-thrown 
kiwix-response))
+                                    "exited abnormally with code 7\n")
+                  (warn "kiwix.el failed to connect to host. exited abnormally 
with status code: 7."))))
+      :success (cl-function
+                (lambda (&key data &allow-other-keys)
+                  (setq kiwix-server-available? t)))
       :status-code '((404 . (lambda (&rest _) (message (format "Endpoint %s 
does not exist." url))))
                      (500 . (lambda (&rest _) (message (format "Error from  
%s." url))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]