From be66260bb4cb4adfff3a350fc6e23f41a3da4ff0 Mon Sep 17 00:00:00 2001 From: mousebot Date: Wed, 26 May 2021 17:23:13 +0200 Subject: typos in tl and http error responses in http.el for attachments --- lisp/mastodon-http.el | 8 ++++++-- lisp/mastodon-toot.el | 3 +-- 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")) -- cgit v1.2.3