This PR implements a rework of the retry API to succicently handle custom retry callbacks passed to .from(). The API is extended in such a way that the custom retry handler function passed to .from() has an option to either invoke the default retry handler or skip it completely. That is, currently retries on 503's work out of the box with this library but if you add a custom retry handler it is your responsibility to register that default handler otherwise 503's won't be handled.
The purpose and motivation of this PR was to handle custom retries (duh) but more importantly 500's. As a result the test suite for this PR is in respect to 500 errors.
This PR implements a rework of the retry API to succicently handle custom retry callbacks passed to .from(). The API is extended in such a way that the custom retry handler function passed to .from() has an option to either invoke the default retry handler or skip it completely. That is, currently retries on 503's work out of the box with this library but if you add a custom retry handler it is your responsibility to register that default handler otherwise 503's won't be handled.
The purpose and motivation of this PR was to handle custom retries (duh) but more importantly 500's. As a result the test suite for this PR is in respect to 500 errors.