从 firebase 函数连接到 mongodb atlas 时,我随机出现以下错误。知道是什么原因造成的(它似乎在没有任何干预的情况下自动修复)?
{
MongoError: command aggregate requires authentication
at queryCallback (/user_code/node_modules/mongoose/node_modules/mongodb-core/lib/cursor.js:248:25)
at /user_code/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:532:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
operationTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1540073032 },
ok: 0,
errmsg: 'command aggregate requires authentication',
code: 13,
codeName: 'Unauthorized',
'$clusterTime':
{ clusterTime: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1540073032 },
signature: { hash: [Object], keyId: [Object] } },
name: 'MongoError'
}