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);
    });

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

1 participant