.
.
Thread👇
* A network error stopped our HTTP connection to the 3rd party
* The 3rd party returned an error (e.g., Twitter has 65 different error codes: developer.twitter.com/en/docs/basics…)
* A timeout occurred (the trickiest b/c the request may have succeeded)
11/
* Unavailable - the 3rd party was unreachable
* Unauthorized - the 3rd party returned an error indicating the user’s API credentials are not valid
* Forbidden - the 3rd party refused the request
12/
* Unavailable - retry the API Call with exponential back-off (github.com/mperham/sideki…)
* Unauthorized - cancel the job and notify the user to re-authorize with the 3rd Party
* Forbidden - cancel the job and notify the user
13/
A friend building a new application asked me for advice on how to manage API and inspired this thread. Hopefully the points above save others from the headaches we went through early on 😅