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

Replace non Bluebird catch styles #7

Merged
merged 8 commits into from
Jun 3, 2024
Merged

Conversation

jpg619
Copy link
Contributor

@jpg619 jpg619 commented May 31, 2024

This pull request primarily involves changes to error handling in various test cases across multiple files, along with an update to the package version in package.json. The error handling changes involve replacing the previous method of catching specific errors with a more general error catch block, which then checks if the caught error is an instance of the expected error.

Error handling changes:

  • test/basic-api-errors-test.js: Modified error handling in the tests test transaction outside of session, test atomic outside of session, test getConnection after release, and test transaction after release to use a general catch block and then check if the error is an instance of db.NoSessionAvailable. [1] [2] [3] [4]

  • test/basic-atomic-error-test.js: Modified error handling in the tests test error in BEGIN and test error in COMMIT to use a general catch block and then check if the error is an instance of BeginError or CommitError respectively. [1] [2]

  • test/basic-session-error-test.js: Modified error handling in the test cannot connect to use a general catch block and then check if the error is an instance of TestError.

  • test/basic-transaction-error-test.js: Modified error handling in the tests test error in BEGIN and test error in COMMIT to use a general catch block and then check if the error is an instance of BeginError or CommitError respectively. [1] [2]

Package version update:

  • package.json: Updated the package version from 1.3.2 to 1.4.2.

Ref: https://github.com/github/npm/issues/12234

@jpg619 jpg619 self-assigned this May 31, 2024
@jpg619 jpg619 changed the title test 1 Replace non Bluebird catch styles May 31, 2024
package.json Outdated Show resolved Hide resolved
test/basic-api-errors-test.js Outdated Show resolved Hide resolved
@jpg619 jpg619 marked this pull request as ready for review June 3, 2024 17:52
@jpg619 jpg619 requested a review from nishantms June 3, 2024 17:52
@jpg619
Copy link
Contributor Author

jpg619 commented Jun 3, 2024

.lock --global

@jpg619 jpg619 merged commit dfaf43a into master Jun 3, 2024
2 checks passed
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.

2 participants