Closed arjanmels closed 10 months ago
Thanks for the feedback @arjanmels, I've made some code changes as an attempt to resolve this. Do you have some sample code I could use to test against?
Sample code: wait > 1h (the default OAuth expiry time) between creation of GoogleVision and the call of detect. (I happened to stumble upon it, because I had a debug session running in flutter, which took >1h.)
I got a "Unhandled Exception: DioException [bad response]: The request returned an invalid status code of 401". Due to the token being expired.
As a workaround I refresh the entire GoogleVision object, but I think this should be handled in the class itself. (The infrastructure seems in place with the tokenExpired field, but it is not checked before making actual requests.)