aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-http.el9
-rw-r--r--lisp/mastodon.el7
2 files changed, 8 insertions, 8 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index a345324..aef8975 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -180,13 +180,8 @@ SILENT means don't message.
NO-HEADERS means don't collect http response headers.
VECTOR means return json arrays as vectors."
(let ((buf (mastodon-http--get url params silent)))
- ;; (if (not buf)
- ;; (error "Request returned nada")
- (condition-case x
- (with-current-buffer buf
- (mastodon-http--process-response no-headers vector))
- (wrong-type-argument
- (error "Request returned nada")))))
+ (with-current-buffer buf
+ (mastodon-http--process-response no-headers vector))))
(defun mastodon-http--get-json (url &optional params silent vector)
"Return only JSON data from URL request.
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index ffeee82..abc7787 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -315,7 +315,12 @@ FORCE means to fetch from the server and update
nil :silent)))
(if force
(setq mastodon-profile-credential-account
- (eval req))
+ ;; TODO: we should also signal a quit condition after like 5
+ ;; secs here
+ (condition-case x
+ (eval req)
+ (t ; req fails, return old value
+ mastodon-profile-credential-account)))
(or mastodon-profile-credential-account
(setq mastodon-profile-credential-account
(eval req))))))