Skip to content

fix(errors): track errors from response when response status is not ok#722

Open
TatianaFomina wants to merge 1 commit intomasterfrom
fix/log-server-errors
Open

fix(errors): track errors from response when response status is not ok#722
TatianaFomina wants to merge 1 commit intomasterfrom
fix/log-server-errors

Conversation

@TatianaFomina
Copy link
Copy Markdown
Contributor

Send to hawk errors from response body if status is not 200.

It used to be shown in garage as
image

@neSpecc
Copy link
Copy Markdown
Member

neSpecc commented Aug 22, 2025

image

@neSpecc
Copy link
Copy Markdown
Member

neSpecc commented Aug 22, 2025

Server response to query AllWorkspacesWithProjects:

{
    "errors": [
        {
            "message": "You need to refresh your tokens",
            "locations": [
                {
                    "line": 3,
                    "column": 5
                }
            ],
            "path": [
                "workspaces"
            ],
            "extensions": {
                "code": "ACCESS_TOKEN_EXPIRED_ERROR"
            }
        }
    ],
    "data": {
        "workspaces": null
    }
}

Comment on lines +145 to +147
if (!response || !response.data) {
return response;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statement seems unclear for me

@neSpecc
Copy link
Copy Markdown
Member

neSpecc commented Sep 2, 2025

Please update PR description with more information about your approach. It is not clear for me at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants