-
Bun SQLIn bun packages the errors are very short without much information to debug, the SQL in this case is being generated with an ORM, so it's really hard to find what's causing the issue. PGFor example if I use the PG library for the same project it gives me detailed error log, which is really helpful for debugging. Is there any way I can get the full stack trace and errors in bun? |
Beta Was this translation helpful? Give feedback.
Answered by
opuu
Feb 25, 2025
Replies: 1 comment
-
Enabling logger shows the queries, but still not enough information about the error: import { SQL } from 'bun'
import { drizzle } from 'drizzle-orm/bun-sql'
import * as schema from '@/db/schemas'
import env from '@/env'
const client = new SQL(env.DB_STRING)
export const db = drizzle(client, {
schema,
logger: env.APP_ENV === 'local',
})
export type DB = typeof db
export default db |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
opuu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Enabling logger shows the queries, but still not enough information about the error: