aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-06-07 20:43:18 +0200
committermousebot <mousebot@riseup.net>2021-06-07 20:43:18 +0200
commit0c5139649cfd1698049a06b7cbcdabba4c95e17a (patch)
tree0494cd5ab37a136465866c4131f035dae3bf9edd /lisp/mastodon-http.el
parentaf3705d107a248c1edc0742f6a8533bef533b6a5 (diff)
attempt to handle response errors in mastodon-http--process-json
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index cb211d4..144b446 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -126,7 +126,9 @@ Pass response buffer to CALLBACK function."
(buffer-substring-no-properties (point) (point-max))
'utf-8)))
(kill-buffer)
- (json-read-from-string json-string)))
+ (if (not (or (string= "" json-string) (equal nil json-string)))
+ (json-read-from-string json-string)
+ (message "Looks like we got no JSON from the server."))))
(defun mastodon-http--delete (url)
"Make DELETE request to URL."