From 93a5c652a97f2b591c32ec4902bbc24781b9a9d7 Mon Sep 17 00:00:00 2001 From: mousebot Date: Mon, 7 Jun 2021 17:06:54 +0200 Subject: mastodon-http--get-async, only process json when status is returned (hopefully) --- lisp/mastodon-http.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 678e628..cb211d4 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -208,7 +208,8 @@ Pass response buffer to CALLBACK function with args CBARGS." (mastodon-http--get-async url (lambda (status) - (apply callback (mastodon-http--process-json) args)))) + (when status ;; only when we actually get sth? + (apply callback (mastodon-http--process-json) args))))) (defun mastodon-http--post-async (url args headers &optional callback &rest cbargs) "POST asynchronously to URL with ARGS and HEADERS. -- cgit v1.2.3