cloudant / nodejs-cloudant

Cloudant Node.js client library
Apache License 2.0
255 stars 90 forks source link

456 retry timeout hang #457

Closed ricellis closed 3 years ago

ricellis commented 3 years ago

Checklist

Description

Ensure callback gets called for errors after response is already being processed.

Fixes #456

Approach

It is worth noting the current behaviour on an error encountered during response processing when using the retry plugin is:

This change retains the current behaviour except for the hang where the callback isn't called. It is not possible to allow retries once the response is already processing because it will change the events in the listener style usage (and multiple response or data events will be unexpected and difficult to manage).

Schema & API Changes

Security and Privacy

Testing

The tests cannot use nock because it does not trigger the timeouts, so they use their own mock server.

Monitoring and Logging