Okamikun
12/09/2021, 2:53 AM2021-12-09T02:11:42.536Z 38e30598-f091-5333-936d-5fb3975e21d6 Task timed out after 62.06 seconds
Is that normal behavior or do I need to change my settings so that an error is thrown by Prisma?
This is my table definition:
model tbl_Log {
id Int @id @default(autoincrement())
type LogType
message String?
createdAt DateTime
user tbl_User @relation(fields: [userId], references: [id])
userId String
orderSnapshot Json
amount Float
}
And I am creating the DB entry via:
await prisma.tbl_Log.create({
data: {
type: log.type!,
message: log.message!,
createdAt: log.createdAt!,
userId,
orderSnapshot: log.orderSnapshot!,
amount: log.amount ?? 0,
},
});
If amount is null, the Lambda function hangs at this step, if amount has a number it works (with 0, too).Mike Willbanks
12/09/2021, 3:49 AMOkamikun
12/09/2021, 3:52 AM.create, there are other interactions with the DB which are working fine, like .findUnique. Could it still be that only the .create can’t get a connection?Mike Willbanks
12/09/2021, 3:52 AMOkamikun
12/09/2021, 6:11 AM2021-12-09T06:05:48.374Z prisma:client:fetcher Error: Failed to validate the query: `Unable to match input value to any allowed input type for the field. Parse errors: [Query parsing/validation error at `Mutation.createOnetbl_Log.data.tbl_LogCreateInput.user`: A value is required but not set., Query parsing/validation error at `Mutation.createOnetbl_Log.data.tbl_LogUncheckedCreateInput.currencyAmount`: A value is required but not set.]` at `Mutation.createOnetbl_Log.data`
And I can also see that the currencyAmount value is NaN instead of 0 as it should be from my code.
My question now is, why doesn’t this trigger the catch routine in my code?Okamikun
12/09/2021, 7:14 AM