You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I send a request to endpont: "GET /api/websites/:websiteId/events" I get error 500.
Error: Invalid value for argument parameters: Could not convert from JSON date object to PrismaValue. Expected Flat JSON array (no nesting).
Database
PostgreSQL
Relevant log output
2025-02-02 11:49:07 Error [PrismaClientValidationError]:
2025-02-02 11:49:07 Invalid `prisma.$queryRawUnsafe()` invocation:2025-02-02 11:49:07 2025-02-02 11:49:07 {2025-02-02 11:49:07 query: "select count(*) as num from (\n with events as (\n select\n event_id as \"id\",\n website_id as \"websiteId\", \n session_id as \"sessionId\",\n created_at as \"createdAt\",\n url_path as \"urlPath\",\n url_query as \"urlQuery\",\n referrer_path as \"referrerPath\",\n referrer_query as \"referrerQuery\",\n referrer_domain as \"referrerDomain\",\n page_title as \"pageTitle\",\n event_type as \"eventType\",\n event_name as \"eventName\"\n from website_event\n where website_id = $1::uuid\n and created_at between $2 and $3\n \n \n order by created_at desc\n limit 1000)\n select * from events\n ) t",2025-02-02 11:49:07 parameters: {2025-02-02 11:49:07 values: "[\"38b669df-e4e8-4c51-a1d1-fedbba019f38\",{\"prisma__type\":\"date\",\"prisma__value\":null},{\"prisma__type\":\"date\",\"prisma__value\":\"1970-01-01T00:00:00.000Z\"}]",2025-02-02 11:49:07 __prismaRawParameters__: true2025-02-02 11:49:07 }2025-02-02 11:49:07 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2025-02-02 11:49:07 }2025-02-02 11:49:07 2025-02-02 11:49:07 Invalid value for argument `parameters`: Could not convert from `JSON date object` to `PrismaValue`. Expected Flat JSON array (no nesting).2025-02-02 11:49:07 at wn (/app/node_modules/@prisma/client/runtime/library.js:29:1363)2025-02-02 11:49:07 at $n.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:6958)2025-02-02 11:49:07 at $n.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:6623)2025-02-02 11:49:07 at $n.request (/app/node_modules/@prisma/client/runtime/library.js:121:6307)2025-02-02 11:49:07 at async l (/app/node_modules/@prisma/client/runtime/library.js:130:9633)2025-02-02 11:49:07 at async p (/app/.next/server/chunks/6711.js:1:21850)2025-02-02 11:49:07 at async m (/app/.next/server/pages/api/websites/[websiteId]/events.js:1:2039)2025-02-02 11:49:07 at async z (/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16764)2025-02-02 11:49:07 at async U.render (/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:17472)2025-02-02 11:49:07 at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:618:9) {2025-02-02 11:49:07 clientVersion: '5.22.0'2025-02-02 11:49:07 }2025-02-02 11:49:07 ⨯ Error [PrismaClientValidationError]: 2025-02-02 11:49:07 Invalid `prisma.$queryRawUnsafe()` invocation:2025-02-02 11:49:07 2025-02-02 11:49:07 {2025-02-02 11:49:07 query: "select count(*) as num from (\n with events as (\n select\n event_id as \"id\",\n website_id as \"websiteId\", \n session_id as \"sessionId\",\n created_at as \"createdAt\",\n url_path as \"urlPath\",\n url_query as \"urlQuery\",\n referrer_path as \"referrerPath\",\n referrer_query as \"referrerQuery\",\n referrer_domain as \"referrerDomain\",\n page_title as \"pageTitle\",\n event_type as \"eventType\",\n event_name as \"eventName\"\n from website_event\n where website_id = $1::uuid\n and created_at between $2 and $3\n \n \n order by created_at desc\n limit 1000)\n select * from events\n ) t",2025-02-02 11:49:07 parameters: {2025-02-02 11:49:07 values: "[\"38b669df-e4e8-4c51-a1d1-fedbba019f38\",{\"prisma__type\":\"date\",\"prisma__value\":null},{\"prisma__type\":\"date\",\"prisma__value\":\"1970-01-01T00:00:00.000Z\"}]",2025-02-02 11:49:07 __prismaRawParameters__: true2025-02-02 11:49:07 }2025-02-02 11:49:07 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2025-02-02 11:49:07 }2025-02-02 11:49:07 2025-02-02 11:49:07 Invalid value for argument `parameters`: Could not convert from `JSON date object` to `PrismaValue`. Expected Flat JSON array (no nesting).2025-02-02 11:49:07 at wn (/app/node_modules/@prisma/client/runtime/library.js:29:1363)2025-02-02 11:49:07 at $n.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:6958)2025-02-02 11:49:07 at $n.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:6623)2025-02-02 11:49:07 at $n.request (/app/node_modules/@prisma/client/runtime/library.js:121:6307)2025-02-02 11:49:07 at async l (/app/node_modules/@prisma/client/runtime/library.js:130:9633)2025-02-02 11:49:07 at async p (/app/.next/server/chunks/6711.js:1:21850)2025-02-02 11:49:07 at async m (/app/.next/server/pages/api/websites/[websiteId]/events.js:1:2039)2025-02-02 11:49:07 at async z (/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:16764)2025-02-02 11:49:07 at async U.render (/app/node_modules/next/dist/compiled/next-server/pages-api.runtime.prod.js:20:17472)2025-02-02 11:49:07 at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:618:9) {2025-02-02 11:49:07 clientVersion: '5.22.0'2025-02-02 11:49:07 }
Which Umami version are you using? (if relevant)
2.15.1
Which browser are you using? (if relevant)
None. Using Postman to requests
How are you deploying your application? (if relevant)
Docker, on my local machine
The text was updated successfully, but these errors were encountered:
Yep same error, simply playing with the API returns the error pointed out above im simply inquiring about the events in the app.
using image - umami@sha256:b96ff776b0e1dfafb3c366a92119b1a72a656c9c20006d47e07df9dbbffe9331
Yep same error, simply playing with the API returns the error pointed out above im simply inquiring about the events in the app.
using image - umami@sha256:b96ff776b0e1dfafb3c366a92119b1a72a656c9c20006d47e07df9dbbffe9331
If you put all the query parameters it doesn't give an error. But I think I wanted to return a Bad Request instead of a 500 error.
Describe the Bug
When I send a request to endpont: "GET /api/websites/:websiteId/events" I get error 500.
Error: Invalid value for argument
parameters
: Could not convert fromJSON date object
toPrismaValue
. Expected Flat JSON array (no nesting).Database
PostgreSQL
Relevant log output
Which Umami version are you using? (if relevant)
2.15.1
Which browser are you using? (if relevant)
None. Using Postman to requests
How are you deploying your application? (if relevant)
Docker, on my local machine
The text was updated successfully, but these errors were encountered: