Skip to content

feat: [IOCOM-2969] SEND AAR TTL error screens#7897

Merged
forrest57 merged 30 commits intomasterfrom
IOCOM-2969-fe-implementazione-schermate-di-errore-per-la-gestione-del-ttl
Mar 17, 2026
Merged

feat: [IOCOM-2969] SEND AAR TTL error screens#7897
forrest57 merged 30 commits intomasterfrom
IOCOM-2969-fe-implementazione-schermate-di-errore-per-la-gestione-del-ttl

Conversation

@forrest57
Copy link
Copy Markdown
Contributor

Short description

--- 🔴 DEPENDS ON #7880 🔴 ---

this PR introduces the logic required to display the correct error screens in case of a TTL error in both the mandate creation and mandate validation steps of the AAR delegation flow

mandate validation mandate creation
Screenshot 2026-02-26 at 15 27 54 Screenshot 2026-02-26 at 15 30 32

List of changes proposed in this pull request

  • added required components
  • added required i18n entries
  • refactored the error handling logic to accomodate for the new components
  • tests

How to test

  • automated tests should pass.
  • make sure the pre-implemented error screens in the AAR flow behave and display as expected

Also, using either the dev-server or proxy software (e.g. proxyman):

  • a 500 error in the mandate creation response with {code:PN_MANDATE_ALREADYEXISTS} as the first entry in the errors array should result in its specific error screen. no other configuration (e.g. different http code, different error as the first entry) should result in the same screen.
  • a 500 error in the mandate validation response with {code: PN_MANDATE_NOTFOUND} as its first entry in the errors array should behave the same way as the mandate creation response logic.

@forrest57 forrest57 added tests in progress Legacy-IO-Comunicazione Legacy Team: IO Comunicazione labels Feb 26, 2026
@forrest57 forrest57 self-assigned this Feb 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 26, 2026

Jira Pull Request Link

This Pull Request refers to Jira issues:

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.05%. Comparing base (949f9d5) to head (c531a0f).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7897      +/-   ##
==========================================
+ Coverage   60.04%   60.05%   +0.01%     
==========================================
  Files        1967     1968       +1     
  Lines       43915    43929      +14     
  Branches    10139    10141       +2     
==========================================
+ Hits        26367    26381      +14     
  Misses      17460    17460              
  Partials       88       88              
Files with missing lines Coverage Δ
...ents/errors/SendAarCieValidationErrorComponent.tsx 100.00% <100.00%> (ø)
.../errors/SendAarPendingDelegationErrorComponent.tsx 100.00% <100.00%> (ø)
ts/features/pn/aar/utils/aarErrorMappings.ts 96.42% <100.00%> (+0.59%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 949f9d5...c531a0f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dpulls
Copy link
Copy Markdown

dpulls Bot commented Mar 9, 2026

🎉 All dependencies have been resolved !

@forrest57 forrest57 marked this pull request as draft March 9, 2026 11:25
@forrest57 forrest57 marked this pull request as ready for review March 9, 2026 14:36
Comment thread locales/it/index.json Outdated
Comment thread ts/features/pn/aar/utils/aarErrorMappings.ts
Comment thread ts/features/pn/aar/utils/aarErrorMappings.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for rendering dedicated UI error screens for specific SEND AAR delegation failures (TTL/mandate-related) during mandate validation and mandate creation, by extending the AAR problem-json error mapping and introducing new error components with related tests/i18n.

Changes:

  • Extended getAarErrorBehaviour mapping to support new status+errorCode combinations and added two new error components.
  • Added/updated component tests and snapshots to cover the new screens.
  • Added Italian i18n strings for the new error screens.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ts/features/pn/aar/utils/aarErrorMappings.ts Adds new error codes and status mappings to render the new TTL/pending-delegation screens.
ts/features/pn/aar/utils/tests/aarErrorMappings.test.tsx Expands mapping test matrix and mocks constVoid for new behaviours.
ts/features/pn/aar/components/errors/SendAarPendingDelegationErrorComponent.tsx New “pending delegation” error screen component for mandate creation flow.
ts/features/pn/aar/components/errors/SendAarCieValidationErrorComponent.tsx Adds CieValidationExpiredTtlComponent for mandate validation TTL expiry.
ts/features/pn/aar/components/errors/tests/SendAarPendingDelegationErrorComponent.test.tsx Tests snapshot + flow termination for the new pending-delegation screen.
ts/features/pn/aar/components/errors/tests/SendAarCieValidationErrorComponent.test.tsx Adds tests for the new CIE validation TTL-expired component.
ts/features/pn/aar/components/errors/tests/snapshots/SendAarPendingDelegationErrorComponent.test.tsx.snap Snapshot for the new pending-delegation component.
ts/features/pn/aar/components/errors/tests/snapshots/SendAarCieValidationErrorComponent.test.tsx.snap Snapshot for the new CIE validation TTL-expired component.
locales/it/index.json Adds Italian translations for the new error screen texts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ts/features/pn/aar/utils/aarErrorMappings.ts
Comment thread ts/features/pn/aar/utils/aarErrorMappings.ts
Copy link
Copy Markdown
Contributor

@Vangaorth Vangaorth left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

Legacy-IO-Comunicazione Legacy Team: IO Comunicazione

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants