Closed tarolling closed 3 months ago
Output:
MongoServerError: $regex has to be a string at Connection.sendCommand (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/cmap/connection.js:290:27) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Connection.command (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/cmap/connection.js:313:26) at async Server.command (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/sdam/server.js:167:29) at async FindOperation.execute (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/operations/find.js:34:16) at async executeOperation (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/operations/execute_operation.js:136:16) at async FindCursor._initialize (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/cursor/find_cursor.js:51:26) at async FindCursor.cursorInit (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/cursor/abstract_cursor.js:471:27) at async FindCursor.fetchBatch (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/cursor/abstract_cursor.js:503:13) at async FindCursor.next (/home/minecraft/multicraft/servers/server776960/node_modules/mongodb/lib/cursor/abstract_cursor.js:228:13) { errorResponse: { ok: 0, errmsg: '$regex has to be a string', code: 2, codeName: 'BadValue', '$clusterTime': { clusterTime: new Timestamp({ t: 1720432055, i: 6 }), signature: [Object] }, operationTime: new Timestamp({ t: 1720432055, i: 6 }) }, ok: 0, code: 2, codeName: 'BadValue', '$clusterTime': { clusterTime: new Timestamp({ t: 1720432055, i: 6 }), signature: { hash: Binary.createFromBase64('JEH/IP+fLbosKWK7KlNocULO8ZU=', 0), keyId: new Long('7340730494826315786') } }, operationTime: new Timestamp({ t: 1720432055, i: 6 }), [Symbol(errorLabels)]: Set(0) {} }
reproduced by running /club view with no args
/club view
resolved by #8 (was due to empty string being passed into db query)
Output: