commercetools / nodejs

Everything related to the Node.js ecosystem for the commercetools platform.
https://commercetools.github.io/nodejs/
MIT License
75 stars 70 forks source link

Add retryCodes option in HttpMiddlewareOptions #1763

Closed ajimae closed 2 years ago

ajimae commented 2 years ago

Summary

Description

This adds options to allow customers retry requests on a given status (error) codes.

Related Issue:

https://github.com/commercetools/nodejs/issues/1743

Note: Direct file changes are:

Others are as a result of flow (lint:format) changes.

changeset-bot[bot] commented 2 years ago

⚠️ No Changeset found

Latest commit: 2046b6c6b2bf19dd57ebe4ce85e4fe15d357c55e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

codecov[bot] commented 2 years ago

Codecov Report

Merging #1763 (2046b6c) into master (16dff86) will increase coverage by 0.00%. The diff coverage is 93.04%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1763   +/-   ##
=======================================
  Coverage   94.26%   94.26%           
=======================================
  Files         135      135           
  Lines        4792     4795    +3     
  Branches     1275     1278    +3     
=======================================
+ Hits         4517     4520    +3     
  Misses        271      271           
  Partials        4        4           
Impacted Files Coverage Δ
.../sdk-middleware-auth/src/anonymous-session-flow.js 84.61% <77.77%> (ø)
...sdk-middleware-auth/src/client-credentials-flow.js 85.71% <77.77%> (ø)
packages/sdk-middleware-auth/src/password-flow.js 84.61% <77.77%> (ø)
...ages/sdk-middleware-auth/src/refresh-token-flow.js 84.61% <77.77%> (ø)
packages/csv-parser-price/src/main.js 92.47% <100.00%> (ø)
packages/discount-code-importer/src/main.js 100.00% <100.00%> (ø)
packages/inventories-exporter/src/main.js 95.60% <100.00%> (ø)
packages/personal-data-erasure/src/main.js 100.00% <100.00%> (ø)
packages/sdk-auth/src/auth.js 99.26% <100.00%> (ø)
packages/sdk-client/src/client.js 100.00% <100.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 16dff86...2046b6c. Read the comment docs.

ajimae commented 2 years ago

There seem to be quite a few formatting changes which make it harder to spot the real changes also as it's all in one commit. Can you perform a self review and comment on important areas changed? Thanks.

I will just go ahead and close this PR and open up another without all the extra file changes, I think that will be a lot easier.