-
Notifications
You must be signed in to change notification settings - Fork 653
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
When Google Storage is used to access a file that does not exist, the following uncaught exception is generated by the package:
error: ApiError: Not Found
at new util.ApiError (/tmp/node_modules/google-cloud/node_modules/@google-cloud/common/src/util.js:107:10)
at Object.parseHttpRespMessage (/tmp/node_modules/google-cloud/node_modules/@google-cloud/common/src/util.js:149:33)
at Object.handleResp (/tmp/node_modules/google-cloud/node_modules/@google-cloud/common/src/util.js:124:18)
at .<anonymous> (/tmp/node_modules/google-cloud/node_modules/@google-cloud/storage/src/file.js:632:21)
at emitOne (events.js:96:13)
at emit (events.js:188:7)
at emitOne (events.js:96:13)
at DestroyableTransform.emit (events.js:188:7)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
Going to line 107 of the offending file shows this:
106: util.ApiError = function(errorBody) {
107: return new ApiError(errorBody);
108: };
(EDIT: alleged remedy was not a solution either). ApiError is defined above this code as var ApiError = ....
Environment details
- OS: OSX
- Node.js version: 6.2.1
- npm version: 3.9.3
- google-cloud-node version: 0.41.2
Steps to reproduce
- require
google-cloud - use the storage module to access a non-existent file in a GS bucket
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.