You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by sibelius January 18, 2024
how to get more info no this error?
the document value looks correct, we don't have a pathtimestamp
CastError: Cast to date failed for value "NaN" (type number) at path "timestamp"
at SchemaDate.cast (/app/node_modules/mongoose/lib/schema/date.js:376:11)
at SchemaType.applySetters (/app/node_modules/mongoose/lib/schemaType.js:1219:12)
at SchemaDate.castForQuery (/app/node_modules/mongoose/lib/schema/date.js:410:17)
at castUpdateVal (/app/node_modules/mongoose/lib/helpers/query/castUpdate.js:569:19)
at walkUpdatePath (/app/node_modules/mongoose/lib/helpers/query/castUpdate.js:374:24)
at castUpdate (/app/node_modules/mongoose/lib/helpers/query/castUpdate.js:107:7)
at model.Query._castUpdate (/app/node_modules/mongoose/lib/query.js:4569:10)
at model.Query._findOneAndUpdate (/app/node_modules/mongoose/lib/query.js:3260:23)
at model.Query.exec (/app/node_modules/mongoose/lib/query.js:4290:80)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
stringValue: '"NaN"',
messageFormat: undefined,
kind: 'date',
value: NaN,
path: 'timestamp',
reason: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(false)
at castDate (/app/node_modules/mongoose/lib/cast/date.js:40:10)
at SchemaDate.cast (/app/node_modules/mongoose/lib/schema/date.js:374:12)
at SchemaType.applySetters (/app/node_modules/mongoose/lib/schemaType.js:1219:12)
at SchemaDate.castForQuery (/app/node_modules/mongoose/lib/schema/date.js:410:17)
at castUpdateVal (/app/node_modules/mongoose/lib/helpers/query/castUpdate.js:569:19)
at walkUpdatePath (/app/node_modules/mongoose/lib/helpers/query/castUpdate.js:374:24)
at castUpdate (/app/node_modules/mongoose/lib/helpers/query/castUpdate.js:107:7)
at model.Query._castUpdate (/app/node_modules/mongoose/lib/query.js:4569:10)
at model.Query._findOneAndUpdate (/app/node_modules/mongoose/lib/query.js:3260:23)
at model.Query.exec (/app/node_modules/mongoose/lib/query.js:4290:80) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
},
valueType: 'number'
}
can we add more info? document data, stacktrace from the place that happened this cast error
The text was updated successfully, but these errors were encountered:
Discussed in #14267
Originally posted by sibelius January 18, 2024
how to get more info no this error?
the document value looks correct, we don't have a
path
timestamp
can we add more info? document data, stacktrace from the place that happened this cast error
The text was updated successfully, but these errors were encountered: