Missing error interface exports #2261
Labels
api: storage
Issues related to the googleapis/nodejs-storage API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Environment details
Steps to reproduce
Try to handle errors for bucket.upload with strict typescript or with enabled useUnknownInCatchVariables rule.
Can not safely access e.code or e.errors without
ApiError
interfaceIt appears sdk is not exporting Error interfaces these in the index file: https://github.com/googleapis/nodejs-storage/blob/main/src/nodejs-common/util.ts#L248
Workaround
In version 7.0.1 it's possible to import directly from "@google-cloud/storage/build/src/nodejs-common"
The text was updated successfully, but these errors were encountered: