diff options
author | mousebot <mousebot@riseup.net> | 2021-06-07 20:43:18 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-06-07 20:43:18 +0200 |
commit | 0c5139649cfd1698049a06b7cbcdabba4c95e17a (patch) | |
tree | 0494cd5ab37a136465866c4131f035dae3bf9edd | |
parent | af3705d107a248c1edc0742f6a8533bef533b6a5 (diff) |
attempt to handle response errors in mastodon-http--process-json
-rw-r--r-- | lisp/mastodon-http.el | 4 |
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." |