Skip to content

Retry once and delete cookies on failed - #1830

Merged
isc-klu merged 9 commits into
intersystems-community:masterfrom
isc-klu:cookies
Aug 18, 2026
Merged

Retry once and delete cookies on failed#1830
isc-klu merged 9 commits into
intersystems-community:masterfrom
isc-klu:cookies

Conversation

@isc-klu

@isc-klu isc-klu commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes #1829

  • On a connection failure (ECONNREFUSED/ENOTFOUND/ECONNABORTED/ERR_CANCELED), discard the cached session cookie so the next request re-authenticates instead of resending one that's no longer usable.
  • On a 401, retry the request once automatically after re-authenticating. A 401 is rejected before any server-side request logic runs, so retrying is safe — no risk of duplicating a side effect.

Test plan

  1. In the Management Portal, set the Atelier session timeout to a short value (5s in my testing).
  2. Open a server-side document.
  3. Wait longer than the timeout (10s, to be safe).
  4. Open a different server-side document.

Before this PR: step 4 fails with an error.
After this PR: step 4 succeeds with no error.

@isc-klu isc-klu changed the title Cookies Delete Cookies and Retry Aug 18, 2026
@isc-klu isc-klu changed the title Delete Cookies and Retry Retry once and delete cookies on failed Aug 18, 2026
@isc-klu
isc-klu marked this pull request as ready for review August 18, 2026 21:02
@isc-klu
isc-klu requested a review from isc-bsaviano as a code owner August 18, 2026 21:02
@isc-klu
isc-klu merged commit d05b911 into intersystems-community:master Aug 18, 2026
5 checks passed
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.

User is intermittently unable to connect to server

2 participants