Skip to content

Conversation

@waitingallday
Copy link
Member

@waitingallday waitingallday commented Sep 18, 2025

Issue: https://digital-vic.atlassian.net/browse/SD-1218

What I did

  • Added separate 404 under WrappedAxiosError to handle disabled API endpoint

How to test

Checklist

For all PR's

  • I've added relevant changes to the project Readme if needed
  • I've updated the documentation site as needed
  • I have added tests to cover my changes (if not applicable, please state why in a comment)

For new UI components only

  • I have added a storybook story covering all variants
  • I have checked a11y tab in storybook passes
  • I have added cypress component tests (if the component is interactive)
  • Any events are emitted on the event bus using emitRplEvent

@waitingallday waitingallday self-assigned this Sep 18, 2025
@netlify
Copy link

netlify bot commented Sep 18, 2025

Deploy Preview for ripple-docs canceled.

Name Link
🔨 Latest commit 0e805de
🔍 Latest deploy log https://app.netlify.com/projects/ripple-docs/deploys/68cb7af2d6a7e80008b97ce8

@cypress
Copy link

cypress bot commented Sep 18, 2025

ripple-framework    Run #3034

Run Properties:  status check passed Passed #3034  •  git commit 64f86a21fe: chore: :wrench: add ci compatibility helper
Project ripple-framework
Branch Review feat/improve-api-error-handling
Run status status check passed Passed #3034
Run duration 15m 12s
Commit git commit 64f86a21fe: chore: :wrench: add ci compatibility helper
Committer Jason Smith
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 284
View all changes introduced in this branch ↗︎

@waitingallday waitingallday force-pushed the feat/improve-api-error-handling branch from 64f86a2 to 0e805de Compare September 18, 2025 03:22
@waitingallday waitingallday marked this pull request as ready for review September 18, 2025 03:22
@waitingallday waitingallday changed the title Feat/improve api error handling [SD-1218] Improve api error handling Sep 18, 2025
@waitingallday waitingallday added this to the 2.42.0 milestone Sep 18, 2025
@waitingallday
Copy link
Member Author

This seems to be caused by where the error happens - we currently deal with a 404 returned at the node, but this one was found when an endpoint returned 404 at the route instead. Before:

2025-09-18 10:54:57 [TidePage]  ERROR  GET request failed with status 404 - Not Found: https://nginx-php.pr-306.content-legislation-vic-gov-au.sdp4.sdp.vic.gov.au/api/v1/node/gazette_document/fb2c44d7-6beb-4a51-a802-2f6ae336fdcc?site=71 {"section_io_id":"no section id"}
2025-09-18 10:54:57 [TidePageHandler]  ERROR  Internal error occurred when /api/tide/page?path=%2Fsarahs-test-1 was requested:
WrappedAxiosError: Request failed with status code 404

After:

2025-09-18 11:02:41 [TidePage]  ERROR  GET request failed with status 404 - Not Found: https://nginx-php.pr-306.content-legislation-vic-gov-au.sdp4.sdp.vic.gov.au/api/v1/node/gazette_document/fb2c44d7-6beb-4a51-a802-2f6ae336fdcc?site=71 {"section_io_id":"no section id"}
2025-09-18 11:02:41 [TidePageHandler]  INFO  User error occurred when /api/tide/page?path=%2Fsarahs-test-1 was requested:
NotFoundError: "/node/gazette_document/fb2c44d7-6beb-4a51-a802-2f6ae336fdcc" not found

@dylankelly dylankelly merged commit 618921b into release/2.42.0 Sep 22, 2025
8 checks passed
@dylankelly dylankelly deleted the feat/improve-api-error-handling branch September 22, 2025 23:48
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.

4 participants