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 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-http.el') 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 -- cgit v1.2.3