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

feat: api 404 handling #870

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

hamo225
Copy link
Member

@hamo225 hamo225 commented Dec 24, 2024

  • Updated apiService to remove blanket 404 redirection logic

RISDEV-4872

- Updated apiService to remove blanket 404 redirection logic
- Adjusted announcements page to handle empty states
- Added Playwright tests for empty array scenario

RISDEV-4872
@hamo225 hamo225 changed the title feat: improve error handling and empty state handling for announcements feat: api 404 handling Dec 30, 2024
hamo225 added 11 commits January 6, 2025 14:33
- Added a watcher to redirect to the 404 page if the `useGetNorm` API call returns a 404 status.
- Updated error handling to display `RisErrorCallout` for non-404 errors.

RISDEV-4872
- Added a watcher to redirect to the 404 page if the `useGetNormHtml` API call returns a 404 status.
- Updated error handling logic to conditionally display `RisErrorCallout` for non-404 errors or `loadXmlError`.

RISDEV-4872
- Added test for redirecting to the 404 page when `useGetNorm` returns a 404 response.
- Added test for redirecting to the 404 page when `useGetNormHtml` returns a 404 response.

RISDEV-4872
- enriched the error object with the status codes
- Removed blanket 404 handling
- Adjusted test assertions to include the `status` property in the error object.

RISDEV-4872
- Adds watch logic to redirect to NotFound page when the Articles API returns a 404, as this renders the page non-functional.
- error callout is used for non-404 errors to provide feedback without breaking navigation.
- Added E2E tests for redirection to the NotFound page on 404 and for displaying of an error callout for non-404 errors.

RISDEV-4872
- Implemented logic to redirect to the "NotFound" page when `useNormXml` fails with a 404 error.
- Added an E2E test to verify 404 behavior

RISDEV-4872
Copy link

sonarqubecloud bot commented Jan 7, 2025

@andreasphil andreasphil self-requested a review January 9, 2025 15:20
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.

2 participants