aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-06-04 15:00:25 +0200
committerLorenz Diener <[email protected]>2018-06-04 15:00:25 +0200
commit4c7c0c41f4e21dcec9d12810a1b217959e8863b7 (patch)
tree11bfd195641a84dd010ffc14577a739f3aedcb54 /docs/index.rst
parent620687a07922f66e6e278b74050b5384e0131c36 (diff)
downloadmastodon.py-4c7c0c41f4e21dcec9d12810a1b217959e8863b7.tar.gz
Document errors more
Diffstat (limited to 'docs/index.rst')
-rw-r--r--docs/index.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 4bcc70d..32d928f 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -148,17 +148,26 @@ not exist).
148 148
149`MastodonFileNotFoundError` and `MastodonNetworkError` are IO errors - could be you 149`MastodonFileNotFoundError` and `MastodonNetworkError` are IO errors - could be you
150specified a wrong URL, could be the internet is down or your hard drive is 150specified a wrong URL, could be the internet is down or your hard drive is
151dying. They inherit from MastodonIOError, for easy catching. 151dying. They inherit from `MastodonIOError`, for easy catching. There is a sub-error
152of `MastodonNetworkError`, `MastodonReadTimeout`, which is thrown when a streaming
153API stream times out during reading.
152 154
153`MastodonAPIError` is an error returned from the Mastodon instance - the server 155`MastodonAPIError` is an error returned from the Mastodon instance - the server
154has decided it can't fullfill your request (i.e. you requested info on a user that 156has decided it can't fullfill your request (i.e. you requested info on a user that
155does not exist). 157does not exist). It is further split into `MastodonNotFoundError` (API returned 404)
158and `MastodonUnauthorizedError` (API returned 401). Different error codes might exist,
159but are not currently handled separately.
160
161`MastodonMalformedEventError` is raised when a streaming API listener receives an
162invalid event. There have been reports that this can sometimes happen after prolonged
163operation due to an upstream problem in the requests/urllib libraries.
156 164
157`MastodonRatelimitError` is raised when you hit an API rate limit. You should try 165`MastodonRatelimitError` is raised when you hit an API rate limit. You should try
158again after a while (see the rate limiting section above). 166again after a while (see the rate limiting section above).
159 167
160`MastodonVersionError` is raised when a version check for an API call fails. 168`MastodonVersionError` is raised when a version check for an API call fails.
161 169
170
162Return values 171Return values
163------------- 172-------------
164Unless otherwise specified, all data is returned as python dictionaries, matching 173Unless otherwise specified, all data is returned as python dictionaries, matching
Powered by cgit v1.2.3 (git 2.41.0)