tediousjs / tedious

Node TDS module for connecting to SQL Server databases.
http://tediousjs.github.io/tedious/
MIT License
1.58k stars 439 forks source link

feat: set error cause if available #1649

Closed arthurschreiber closed 3 months ago

arthurschreiber commented 3 months ago

This pull request updates ConnectionError and RequestError with support for a new options argumenton their constructor. This parameter mirrors the options of Error base class and allows setting a cause.

I updated all the locations where ConnectionError or RequestError are constructed to set the cause if available.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.11%. Comparing base (03777a7) to head (dd628c1). Report is 1 commits behind head on master.

Files Patch % Lines
src/request.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1649 +/- ## ========================================== + Coverage 78.99% 79.11% +0.12% ========================================== Files 93 93 Lines 4879 4879 Branches 937 937 ========================================== + Hits 3854 3860 +6 + Misses 721 711 -10 - Partials 304 308 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 3 months ago

:tada: This PR is included in version 18.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: