Mozzo1000 / movielst

:movie_camera: Everything about your movies within the command line.
Other
0 stars 1 forks source link

Rework api status checks #12

Open Mozzo1000 opened 6 years ago

Mozzo1000 commented 6 years ago

In API_util.py we check for http status code, the return statements for any thing not code 200 needs to be changed so it does not return None. Would rather have it return something meaningful with a reason.

If status 401 is returned for either OMDb or TMDb there will still be parsable json to read to determent what went wrong, invalid api key, wrong url or other error.

If an error like a 503 occurs, stop the indexing and return proper statement.

Mozzo1000 commented 6 years ago

Status codes to add :

TMDb status codes reference : https://www.themoviedb.org/documentation/api/status-codes