Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Error: CastError: Cast to ObjectId failed for value

default discord avatar
akacronos2 years ago
2

Recently, I started getting this error when I create docs from my website. I don't know exactly when started. When I create docs with a user-related, the doc it's created but I get this error. Any thoughts?



[18:56:12] ERROR (payload): CastError: Cast to ObjectId failed for value "{ 0|admin | id: '6422b93a36145bda8bf6ad09', 0|admin | name: 'Jorge', 0|admin | LastNames: 'Escamilla', 0|admin | role: 'attendee', 0|admin | createdAt: '2023-03-28T09:54:02.620Z', 0|admin | updatedAt: '2023-03-28T18:55:59.271Z' 0|admin | }" (type Object) at path "_id" for model "users" 0|admin | at model.Query.exec (/home/cronos/labnl-admin/node_modules/mongoose/lib/query.js:4789:21) 0|admin | at model.Query.Query.then (/home/cronos/labnl-admin/node_modules/mongoose/lib/query.js:4888:15) 0|admin | at processTicksAndRejections (node:internal/process/task_queues:95:5)
  • default discord avatar
    jessrynkar2 years ago

    Hey

    @706208036439588934

    are you still getting this error?

  • default discord avatar
    akacronos2 years ago

    No

    @854377910689202256

    , thanks, it was an access problem. 🙂

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.