Skip to content

fix(replication): surface HTTP 413 via paused/error events#9185

Open
Mayankaggarwal8055 wants to merge 1 commit intoapache:masterfrom
Mayankaggarwal8055:fix/9165-413-replication
Open

fix(replication): surface HTTP 413 via paused/error events#9185
Mayankaggarwal8055 wants to merge 1 commit intoapache:masterfrom
Mayankaggarwal8055:fix/9165-413-replication

Conversation

@Mayankaggarwal8055
Copy link

Fixes #9165

HTTP 413 (Content Too Large) from CouchDB _bulk_docs during live replication was silently retried via backOff() instead of surfacing through paused(err) events as users expect.

Solution: In completeReplication(), treat 413 as fatal - emit paused(error) + error(error) and stop retrying.

Changes:

+ } else if (fatalError.status === 413) {
+   returnValue.emit('paused', fatalError);
+   returnValue.emit('error', fatalError);
+   returnValue.removeAllListeners();
+ } else {
    backOff(opts, returnValue, fatalError, function () {
      replicate(src, target, opts, returnValue);
    });

@Mayankaggarwal8055
Copy link
Author

Mayankaggarwal8055 commented Mar 6, 2026

Hi @janl @alxndrsn @SCdF ,

This PR addresses issue #9165 by surfacing HTTP 413 errors during live replication through paused(err) and error(err) events instead of silently retrying.

Currently the workflow is awaiting maintainer approval before CI can run.
Whenever you have time, could you please take a look and approve the workflow so the checks can start?

Thanks!

@alxndrsn
Copy link
Contributor

alxndrsn commented Mar 6, 2026

Hi @janl @alxndrsn @SCdF ,

Please don't tag me in comments unless specifically relevant.

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.

HTTP 413 during live replication is not surfaced via replication events

2 participants