Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.
This repository was archived by the owner on Jan 3, 2026. It is now read-only.

feat!: Use Native cause in GaxiosError #572

@danielbankhead

Description

@danielbankhead

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    next major: breaking changethis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or fix. May not be included in next release.semver: majorHint for users that this is an API breaking change.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions