Storage non-resumable uploads fail #2050
Labels
api: storage
Issues related to the Cloud Storage API.
core
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Storage non-resumable uploads fail when used with
@google-cloud/common
0.12.1. The error message is:The error message is misleading. The code mistakenly assumes any error thrown
util.makeAuthenticatedRequestFactory -> makeAuthenticatedRequest -> onAuthenticated
is because of a missing project ID.The bug that causes the error was introduced by #1990.
hasOwnProperty
is called on an object that does not have that function. An alternative implementation would be to callObject.hasOwnProperty.call(value, opt)
instead ofvalue.hasOwnProperty(opt)
.Environment details
Steps to reproduce
google-cloud
storage.bucket('my-bucket').upload('file.txt', { resumable: false })
The text was updated successfully, but these errors were encountered: