Skip to content

Capture expired token login #77

@maltevogl

Description

@maltevogl

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

elif response.status_code == 403:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions