Skip to content

MLE-32359: [Node Client] handle Digest nonce-expiry challenge - #1137

Draft
vishwach wants to merge 1 commit into
developfrom
32359
Draft

vishwach wants to merge 1 commit into
developfrom
32359

Conversation

@vishwach

@vishwach vishwach commented Nov 27, 2026 •

Copy link
Copy Markdown

MLE-32359: Handle Digest nonce expiry in the Node client

MarkLogic now expires Digest nonces after 5 minutes (MLE-29778) and returns 401 with stale=true. The Node client didn't handle this, so long-running clients started failing after 5 minutes.

Fix: on a Digest 401 with stale=true, the client picks up the new nonce and retries the request once.

  • A 401 without stale=true (e.g. wrong password) still fails as before.
  • Retries at most once, so no loops.
  • Streamed requests aren't retried.
  • Other auth types are unaffected.

Tests: added test-basic/digest-stale-nonce-test.js.

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.

1 participant