aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-06-20 18:58:26 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-06-20 18:58:26 +0200
commitae51f4c0bfca79559965ee253e82f45388d83fae (patch)
tree816a0bfa8566d3b1477b5276e530723e985a1e4f /lisp/mastodon-http.el
parent796896086d92a266de13f70443189106c1241d85 (diff)
fix html render on error in process-json
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index dc007f3..4a8e76a 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -184,7 +184,7 @@ Callback to `mastodon-http--get-json-async', usually
"Render STRING as HTML in a temp buffer.
STRING should be a HTML for a 404 errror."
(with-temp-buffer
- (insert json-string)
+ (insert string)
(shr-render-buffer (current-buffer))
(view-mode) ; for 'q' to kill buffer and window
(error ""))) ; stop subsequent processing
@@ -212,7 +212,7 @@ Callback to `mastodon-http--get-response-async', usually
;; if we get html, just render it and error:
;; ideally we should handle the status code in here rather than
;; this crappy hack?
- ((string-prefix-p "\n<!" json-string) ; html hack
+ ((string-prefix-p "\n<" json-string) ; html hack
(mastodon-http--render-html-err json-string))
;; if no json or html, maybe we have a plain string error message
;; (misskey does this, but there are probably better ways to do