David AlonsoD
Convex Community2y ago
12 replies
David Alonso

Cryptic undefined is not valid Convex value error

I'm running into this
6/8/2024, 4:12:56 PM [CONVEX M(mutations/blocks/blocks:updateMultipleBlockGridLayouts)] Uncaught Error: undefined is not a valid Convex value (present at path [0] in original object ["undefined","undefined","undefined"]). To learn about Convex's supported types, see https://docs.convex.dev/using/types.
    at convexToJsonInternal (../../node_modules/convex/src/values/value.ts:287:6)
    at <anonymous> (../../node_modules/convex/src/values/value.ts:322:4)
    at map [as map] (<anonymous>)
    at convexToJsonInternal (../../node_modules/convex/src/values/value.ts:320:29)
    at convexToJson (../../node_modules/convex/src/values/value.ts:417:0)

Have tried adding a bunch of logging statements to catch the undefined values but I can't see where the issue is.

I can add console logs up to this point:
      return await context.db.patch(block._id, { properties: pageProperties });
Was this page helpful?