From ffcd7553d708c775127946dfe638cba0cda34312 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Mon, 19 Aug 2024 12:08:53 +0200 Subject: comment re instance JSON error --- lisp/mastodon-http.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lisp') diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 1b624ee..39c1036 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -249,6 +249,10 @@ Callback to `mastodon-http--get-response-async', usually (string-prefix-p "\n[" json-string))) (error "%s" json-string)) (t + ;; instance may return error in JSON e.g. ((error . "Record not + ;; found")) for a null endpoint. but we don't error here because + ;; sometimes we just want to check for such an error in an + ;; if/cond. `(,(json-read-from-string json-string) . ,headers)))))) (defun mastodon-http--process-headers () -- cgit v1.2.3