Skip to content

Configure API proxy timeout - #2903

Open
TimDanielsCQI wants to merge 9 commits into
masterfrom
PO-3939
Open

Configure API proxy timeout#2903
TimDanielsCQI wants to merge 9 commits into
masterfrom
PO-3939

Conversation

@TimDanielsCQI

@TimDanielsCQI TimDanielsCQI commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Jira link

See PO-3939

Change description

Updates @hmcts/opal-frontend-common-node from 0.0.39 to released version 0.0.43.

This consumes the shared proxy timeout and error-handling support delivered in opal-frontend-common-node-lib#368.

The frontend branch configures a 30-second API proxy timeout and passes it to both the Fines Service and User Service proxies. Startup now fails clearly if that timeout configuration is absent.

The upgraded shared library:

  • applies the configured timeout to upstream proxy requests;
  • maps timeout and recognised transport failures to a 504 Gateway Timeout problem response with retriable: true;
  • maps unexpected proxy failures to 502 Bad Gateway with retriable: false;
  • does not automatically replay requests. Any retry remains an explicit frontend decision and should only be enabled for safe, idempotent requests.

Testing completed

  • Confirmed Yarn resolves @hmcts/opal-frontend-common-node to exactly 0.0.43.
  • corepack yarn build:ssr — passed.
  • corepack yarn test:coverage — passed: 288 test files, 2,941 tests.
  • Local smoke test completed:
    • http://localhost:4550/health returned HTTP 200.
    • http://localhost:4200/sign-in returned HTTP 200.

Testing not completed

A controlled upstream failure environment was not available, so this change has not manually demonstrated:

  • a response delayed beyond the configured 30-second proxy timeout;
  • each recognised transport failure mapping to the 504 response;
  • the returned retriable metadata in a live failure;
  • request attempt counts / confirmation that no request is replayed.

Those cases need a controlled delayed or failing upstream and a request counter. They are shared-library behaviour; this frontend change verifies dependency consumption, SSR compilation and the normal local smoke path.

Security Vulnerability Assessment

CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?

  • Yes
  • No

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

@TimDanielsCQI TimDanielsCQI self-assigned this Jul 23, 2026

@iamfrankiemoran iamfrankiemoran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor change as part of the common-node-library changes

Comment thread server-setup.ts
@TimDanielsCQI

Copy link
Copy Markdown
Contributor Author

Changes done to this library (including readme) and opal-frontend pr

@iamfrankiemoran iamfrankiemoran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM once library is released and bumped here

@Arnabsubedi233 Arnabsubedi233 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@TimDanielsCQI

Copy link
Copy Markdown
Contributor Author

Have updated this branch to consume opal-frontend-common-node-lib v0.0.43

@iamfrankiemoran iamfrankiemoran left a comment

Copy link
Copy Markdown
Contributor

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants