-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Because the try-except clause in ensure_token() catches all exceptions, any exception thrown in the GraphQL call chain causes a pause in execution to try and reauthenticate when running in user mode. However, reauthentication is not required (since the exception isn't necessarily related to auth), so things will continue running fine even if the reauthentication is interrupted.
Back when I thought reauth was required I let each one though, so on the dashboard on fflogs I have a lot of duplicates in my "Authorized Applications" list.
Printing the exception gets me this:
{'message': 'The id field must be non-zero.', 'locations': [{'line': 3, 'column': 5}], 'path': ['worldData', 'encounter']}
I get this specific exception fairly frequently with my workload, which is a lot of calls of fight.events({'sourceID': actor_id, 'dataType': GQLEnum('Casts')}) on a long list of reports and fights.
For now I've mitigated it by replacing self.user_auth() with pass in ensure_token() and it's been running fine. I'm a bit tight on deadlines right now to chase the issue and find a proper solution, so I'm just reporting it for now.