vorsV
Convex Community3y ago
11 replies
vors

I m confused about the schema `s

I'm confused about the schema s.optional

Does it produce undefined, null?
Seems like undefined should be acceptable, but why in this case I'm getting errors when I try to write underfined?


Uncaught Error: undefined is not a valid Convex value (present at path .author in original object {"text":"generated images for prompt: \"horses old\", negative prompt: \"new hello\"","project":{"$id":"projects|mYmq-M1gCCcl0ag4LGlLzA"},"author":"undefined","authorName":"undefined"}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.
  at convexToJsonInternal (../../node_modules/convex/src/values/values.ts:395:6)
  at convexToJsonInternal (../../node_modules/convex/src/values/values.ts:481:2)
  at convexToJson (../../node_modules/convex/src/values/values.ts:499:0)
  at insert [as insert] (../../node_modules/convex/src/server/impl/database_impl.ts:35:7)
  at <anonymous> (../convex/storeImagesInGeneration.ts:31:1)
  at async invokeMutation (../../node_modules/convex/src/server/impl/registration_impl.ts:38:14)
Was this page helpful?