has anyone seen prisma throwing errors with no cod...
# orm-help
g
has anyone seen prisma throwing errors with no code or message? This is what gets thrown by prisma, but it's kind of hard to debug...
Copy code
{
  clientVersion: "3.3.0"
}
Also I can't repro it locally, it only happen in our production environment which makes it even more difficult to debug... This happens when I execute a raw query that looks like this:
Copy code
const query = Prisma.sql`
    select url, count(*) as count
    from (
      select distinct "Status"."userIdStr", "Status".url
      from "Status"
      where "Status"."createdAt" > (to_timestamp(${startDate.getTime()} / 1000.0))
        and "Status".url is not null
      ) as distinct_user_url_statuses
    group by url
    having distinct_user_url_statuses.count > 1
    order by count desc  
    limit ${limit}
    `;

const data = await prisma.$queryRaw<{ url: string; count: number }[]>(query);
plus one +1 2
switched to use
pg
& now this error is thrown:
Copy code
{
address: "..."
code: "ECONNREFUSED"
errno: -111
port: 7516
syscall: "connect"
}
opened an issue here
🙌 1
k
For me, client
3.3.0
works fine, but it is reproducible on version
>=3.4.0