aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-05-26 17:23:13 +0200
committermousebot <mousebot@riseup.net>2021-05-26 17:23:13 +0200
commitbe66260bb4cb4adfff3a350fc6e23f41a3da4ff0 (patch)
treef86e6f31f06ec8560dcbfc5cb543b76dab0f4dac /lisp
parent8309eee64bda0b2a5be7f6eb1d1b26a692117579 (diff)
typos in tl and http error responses in http.el for attachments
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-http.el8
-rw-r--r--lisp/mastodon-toot.el3
2 files changed, 7 insertions, 4 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 7250ef8..61ae840 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -207,8 +207,12 @@ The upload is asynchronous. On succeeding, `mastodon-toot--media-attachment-ids'
)))
(pcase (request-response-status-code response)
(200
- (request-response-data response)
- ))))
+ (request-response-data response))
+ (401
+ (error "Unauthorized: The access token is invalid."))
+ (422
+ (error "Unprocessable entity: file or file type is unsupported or invalid."))
+ (_ (error "Shit went south.")))
(provide 'mastodon-http)
;;; mastodon-http.el ends here
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 6f82ded..cc65597 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -367,7 +367,6 @@ eg. \"feduser@fed.social\" -> \"feduser@fed.social\"."
(defun mastodon-toot--toggle-nsfw ()
"Toggle `mastodon-toot--content-nsfw'."
- ;; This only makes sense once we have attachments.
(interactive)
(setq mastodon-toot--content-nsfw
(not mastodon-toot--content-nsfw))
@@ -417,7 +416,7 @@ e.g. mastodon-toot--send -> Send."
(format "\t%s - %s" key command)))
(defun mastodon-toot--format-kbinds (kbinds)
- "Format a list keybindings, KBINDS, for display in documentation."
+ "Format a list of keybindings, KBINDS, for display in documentation."
(mapconcat 'identity (cons "" (mapcar #'mastodon-toot--format-kbind kbinds))
"\n"))