java,python: better detection of google drive rate limit transient errors