dimcli icon indicating copy to clipboard operation
dimcli copied to clipboard

Capture expired token login

Open maltevogl opened this issue 1 year ago • 0 comments

I am working on an interface for visualizing references and citations relations using the Dimensions API and have an edge case where I can not capture an expired login token. The message returned starts from this line https://github.com/digital-science/dimcli/blob/5e68103a80f503e35c457de6f3361530b0719915/dimcli/core/api.py#L157 I would like to capture an error from dimcli.login(key=api_key) but instead the routine tries again to login with the expired token (self._refresh_login()).

What is the reason behind retrying after an 403 error? Could you give me any input on how to capture this? My code is here: https://gitlab.gwdg.de/modelsen/semanticlayertools/-/blob/main/src/semanticlayertools/visual/citationnet.py#L24

maltevogl avatar Aug 15 '22 10:08 maltevogl