ApiError: Not Found at new util.ApiError
(/site/node_modules/gcloud/lib/common/util.js:128:10) at
Object.parseHttpRespBody
(/site/node_modules/gcloud/lib/common/util.js:206:30) at
Object.handleResp
(/site/node_modules/gcloud/lib/common/util.js:146:18) at
/site/node_modules/gcloud/lib/common/util.js:447:12 at
Request.onResponse [as _callback]
(/site/node_modules/gcloud/node_modules/retry-request/index.js:120:7)
at Request.self.callback
(/site/node_modules/request/request.js:187:22) at Request.emit
(events.js:98:17) at Request.
(/site/node_modules/request/request.js:1044:10) at Request.emit
(events.js:95:17) at IncomingMessage.
(/site/node_modules/request/request.js:965:12) at IncomingMessage.emit
(events.js:117:20) at _stream_readable.js:944:16 at
process._tickDomainCallback (node.js:492:13)
它只出现在生产中(当然)并且目前始终如一.它过去常常出现,并且假设它是一个小故障@ gCloud,因为在本地它无法再现.它与使用最简单的gCloud lib方法bucket.upload的代码部分有关,除了文件之外没有任何参数……这是执行它的当前函数:
function uploadToGoogleCloud(filePath, makePublic) { var gstorage = gcloud.storage({ projectId: EXAMPLE_projectId, credentials: EXAMPLE_credentials, }); var spBucket = Promise.promisifyAll(gstorage.bucket(EXAMPLE_bucket)); return spBucket.uploadAsync(filePath).then(function(file) { if (makePublic) { var fileAsync = Promise.promisifyAll(file); return fileAsync.makePublicAsync().then(function() { return file; }); } return file; }); }
任何反馈都非常感谢.
错误有点模糊,但对我来说是正确的.当我在某些情况下试图写入一个不存在的大查询表时(我不小心将“未定义”作为表名),我得到了这个错误,我怀疑在引擎盖下有一些404错误强制.