From 98c8c3d5c066da085ac540994cc6f8cb1b682a71 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 29 Oct 2024 11:35:09 +0100 Subject: http: return nil if we render html error --- lisp/mastodon-http.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el index 1093de1..47b96fe 100644 --- a/lisp/mastodon-http.el +++ b/lisp/mastodon-http.el @@ -243,7 +243,9 @@ Callback to `mastodon-http--get-response-async', usually ;; ideally we should handle the status code in here rather than ;; this crappy hack? ((string-prefix-p "\n<" json-string) ; html hack - (mastodon-http--render-html-err json-string)) + ;; NB: in this case, process-response returns t!: + (mastodon-http--render-html-err json-string) + nil) ;; return nil instead of t ;; if no json or html, maybe we have a plain string error message ;; (misskey does this, but there are probably better ways to do ;; this): -- cgit v1.2.3