Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Handle case where token has expired... #24

@kitplummer

Description

@kitplummer
     Running `target\debug\tdi.exe me`
Error: Graph error:
GraphError {
    headers: Some(
        GraphHeaders {
            url: "https://graph.microsoft.com/v1.0/me",
            status: 401,
            header_map: {
                "transfer-encoding": "chunked",
                "content-type": "application/json",
                "strict-transport-security": "max-age=31536000",
                "request-id": "1740feb8-b33a-4c08-a6ee-ab5cfc5a18c4",
                "client-request-id": "1740feb8-b33a-4c08-a6ee-ab5cfc5a18c4",
                "x-ms-ags-diagnostic": "{\"ServerInfo\":{\"DataCenter\":\"South Central US\",\"Slice\":\"E\",\"Ring\":\"5\",\"ScaleUnit\":\"003\",\"RoleInstance\":\"SN4PEPF0000050E\"}}",
                "www-authenticate": "Bearer realm=\"\", authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\", client_id=\"00000003-0000-0000-c000-000000000000\"",
                "date": "Fri, 23 Sep 2022 11:57:49 GMT",
            },
        },
    ),
    code: 401,
    error_message: ErrorMessage {
        error: Some(
            ErrorStatus {
                code: Some(
                    "InvalidAuthenticationToken",
                ),
                message: Some(
                    "Access token has expired or is not yet valid.",
                ),
                inner_error: Some(
                    InnerError {
                        code: None,
                        request_id: Some(
                            "1740feb8-b33a-4c08-a6ee-ab5cfc5a18c4",
                        ),
                        date: Some(
                            "2022-09-23T11:57:50",
                        ),
                    },
                ),
            },
        ),
    },
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions