chiark / gitweb /
Use Mastodon's JSON error-documents.
authorSimon Tatham <anakin@pobox.com>
Wed, 24 Jan 2024 20:06:44 +0000 (20:06 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 24 Jan 2024 20:08:55 +0000 (20:08 +0000)
commit0d4e2bad8738927d861484eedb3bded42f7f0ec0
treef05b16b6f10ef92f3d88c0056a0de6c705489ff1
parent029bf84be0c0d6931d04da99a288b2a72c098469
Use Mastodon's JSON error-documents.

When a Mastodon API request returns an HTTP error status, it generally
also delivers a JSON error-document containing a string. This is a
much better error message than the plain HTTP code, because often it
goes into more useful detail. For example, if you have an auth failure
because you haven't confirmed the email address on your new account
yet, the HTTP error code can't tell you anything about email address
confirmation, but the error-document will. So we'll use those messages
in preference, if they're available.
TODO.md
src/client.rs
src/types.rs