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

feat!: Use Native cause in GaxiosError #572

Open
danielbankhead opened this issue Sep 12, 2023 · 0 comments
Open

feat!: Use Native cause in GaxiosError #572

danielbankhead opened this issue Sep 12, 2023 · 0 comments
Labels
next major: breaking change this is a change that we should wait to bundle into the next major version priority: p3 Desirable enhancement or fix. May not be included in next release. semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@danielbankhead
Copy link
Contributor

danielbankhead commented Sep 12, 2023

Node 16+ supports Error#cause. We should use it instead of the existing GaxiosError#error property:

gaxios/src/common.ts

Lines 37 to 42 in c7d5064

constructor(
message: string,
public config: GaxiosOptions,
public response?: GaxiosResponse<T>,
public error?: Error | NodeJS.ErrnoException
) {

Documentation: https://nodejs.org/api/errors.html#errorcause

@danielbankhead danielbankhead added semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p3 Desirable enhancement or fix. May not be included in next release. next major: breaking change this is a change that we should wait to bundle into the next major version labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next major: breaking change this is a change that we should wait to bundle into the next major version priority: p3 Desirable enhancement or fix. May not be included in next release. semver: major Hint for users that this is an API breaking change. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant