Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added network retries option #198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ajzkk
Copy link
Contributor

@ajzkk ajzkk commented Jun 20, 2023

Purpose

Added network retries option

Example Usage

var omise = require('omise')({
  ...
  maxNetworkRetries : 2
});

Checklist

  • I have applied development best practices
  • I am following the change management guidelines
  • If my change require, I have updated the documentation accordingly. [PCI DSS 6.5.6]
  • The default rollback procedure can be used. [PCI DSS 6.5.5.4]
  • All relevant quality testing is being done. [PCI DSS 6.4.5.3]
  • The correct people are assigned to review the pull request. [PCI DSS 6.4.5.2]
  • There is no business impact planned. [PCI DSS 6.4.5.1]
  • The correct labels such as minor, medium, major have been added.
  • If this is a significant change, security team have reviewed the change. [PCI DSS 6.4.6]
  • No manual Pre or Post deployment steps needed.

})
.on('error', reject);
_handleHttpResponse(res, resolve, reject);
}).on('error', (err) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which error cases does this cover?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Network-related errors
  • Connection errors
  • HTTP protocol errors and
  • Server errors(status code in the range of 500-599)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you point me to the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@aashishgurung aashishgurung Jul 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our APIs handles 500 and 503 errors and responds a JSON. Will this cover those cases as well?

https://www.omise.co/api-errors#500-internal-server-error

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

3 participants