Skip to content

Commit

Permalink
fix(retryhandler): ZMS-191-2 (#50)
Browse files Browse the repository at this point in the history
* retry zilter request on errors. Update config

* fix keepAliveMaxTimeout default value

* refactor, make code cleaner

* add methods: POST. Remove 429 status code as to-retry code
  • Loading branch information
NickOvt authored Jan 6, 2025
1 parent 4442c42 commit bb5656d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ module.exports.init = async app => {
maxRetries: maxRetries || 3,
minTimeout: minRetryTimeout || 100,
maxTimeout: maxRetryTimeout || 300,
timeoutFactor: timeoutFactor || 1.5
timeoutFactor: timeoutFactor || 1.5,
statusCodes: [500, 502, 503, 504],
methods: ['POST', 'HEAD', 'OPTIONS', 'CONNECT']
});
const res = await request(zilterUrl, {
dispatcher: agent, // use RetryAgent so in case of request fail - retry
Expand Down

0 comments on commit bb5656d

Please sign in to comment.