aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
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/mastodon-http.el
parent8309eee64bda0b2a5be7f6eb1d1b26a692117579 (diff)
typos in tl and http error responses in http.el for attachments
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el8
1 files changed, 6 insertions, 2 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