Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get TraceId from header - Fix/pn 9848 #1176

Merged
merged 14 commits into from
Dec 11, 2024
Merged

Get TraceId from header - Fix/pn 9848 #1176

merged 14 commits into from
Dec 11, 2024

Conversation

AndreaCimini90
Copy link
Contributor

@AndreaCimini90 AndreaCimini90 commented Apr 3, 2024

Short description

For those errors sent by the ApiGateway, we must take the TraceId from the header.

List of changes proposed in this pull request

  • Get the traceId from the headers if the one in the body is undefined - AppResponse.ts
  • Removed all occurrences of performThunkAction to ensure that all requests use parseError

How to test

  • Login with PF or PG
  • With Netify mutate the https://webapi.dev.notifichedigitali.it/bff/v1/mandate API request with this body
{
    "delegate": {
        "fiscalCode": "csrggl44l13h501e",
        "person": true,
        "displayName": "Gaio Giulio Cesare",
        "firstName": "Gaio Giulio",
        "lastName": "Cesare"
    },
    "visibilityIds": [],
    "verificationCode": "40762",
    "dateto": "2024-10-25"
}
  • Check the Mixpanel Event SEND_TOAST_ERROR contains the property traceId

Since we have removed all occurrences of performThunkAction (from exchangeToken and Zendesk support api), try logging in (with PF, PG, and PA) to verify that exchangeToken works as expected. Additionally, on PF, attempt to make a Zendesk request to ensure it works as expected

@AndreaCimini90 AndreaCimini90 self-assigned this Nov 27, 2024
@AndreaCimini90 AndreaCimini90 marked this pull request as ready for review November 27, 2024 11:06
@AndreaCimini90 AndreaCimini90 requested review from ZorbaDimatteo and a team as code owners November 27, 2024 11:06
Copy link
Contributor Author

@AndreaCimini90 AndreaCimini90 left a comment

Choose a reason for hiding this comment

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

parseError cannot be the right place because we don't use it everywhere. The createAppResponseError should be the right place

@ZorbaDimatteo ZorbaDimatteo merged commit 2e613a7 into develop Dec 11, 2024
5 checks passed
@ZorbaDimatteo ZorbaDimatteo deleted the fix/pn-9848 branch December 11, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants