sai
sai
PPrisma
Created by sai on 7/13/2024 in #help-and-questions
message: "invalid byte sequence for encoding \"UTF8\": 0x00
i am using prisma for my postgresql database and i get this error
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "22021", message: "invalid byte sequence for encoding \"UTF8\": 0x00", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
at In.handleRequestError (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:122:7067)
at In.handleAndLogRequestError (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:122:6211)
at In.request (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:122:5919)
at async l (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:127:11167)
at async paymentNotify (/opt/render/project/src/src/controllers/userController.js:81:27) {
clientVersion: '5.14.0'
}
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "22021", message: "invalid byte sequence for encoding \"UTF8\": 0x00", severity: "ERROR", detail: None, column: None, hint: None }), transient: false })
at In.handleRequestError (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:122:7067)
at In.handleAndLogRequestError (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:122:6211)
at In.request (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:122:5919)
at async l (/opt/render/project/src/node_modules/@prisma/client/runtime/library.js:127:11167)
at async paymentNotify (/opt/render/project/src/src/controllers/userController.js:81:27) {
clientVersion: '5.14.0'
}
const updatePayment = await prisma.payments.create({
data: {
cfPaymentId: data?.payment.cf_payment_id.toString(),
orderId: parseInt(data?.order.order_id),
amount: data?.payment.payment_amount.toString(),
userId: parseInt(data?.customer_details.customer_id),
time: data?.payment.payment_time,
status: data?.payment.payment_status,
},
});
const updatePayment = await prisma.payments.create({
data: {
cfPaymentId: data?.payment.cf_payment_id.toString(),
orderId: parseInt(data?.order.order_id),
amount: data?.payment.payment_amount.toString(),
userId: parseInt(data?.customer_details.customer_id),
time: data?.payment.payment_time,
status: data?.payment.payment_status,
},
});
this is how i use the method and when i console.log these data
5114910644069, 10, 717, 1, 2024-07-13T22:47:42+05:30, SUCCESS
5114910644069, 10, 717, 1, 2024-07-13T22:47:42+05:30, SUCCESS
these are my values, what could be the issue i think it says there is a null byte value somewhere but idk where and why its showing the error
2 replies