Skip to content

Commit

Permalink
check cause instead? (updated 10:29)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Sep 20, 2024
1 parent a05e08c commit 8ba5944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typegen/test/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const getPoolHelper = (params: {__filename: string; baseConnectionURI: st

const setupDb = async () => {
await admin.query(sql`create database ${sql.identifier([dbName])}`).catch(e => {
if (e.message.endsWith('(unique_violation)')) return
if (e.message.includes('unique_violation') || e.cause?.message.match(/database ".+" already exists/)) return
throw e
})

Expand Down

0 comments on commit 8ba5944

Please sign in to comment.