Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/internal/database/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ export class TenantConnection {
throw ERRORS.DatabaseTimeout(e)
}

// Handle pg client connectionTimeoutMillis timeout
// This fires when the connection timeout happens before pool acquisition timeout
if (e instanceof Error && e.message === 'timeout expired') {
throw ERRORS.DatabaseTimeout(e)
}

throw e
}
}
Expand Down
Loading