[X] I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm are you using?
0.36.3
What version of drizzle-kit are you using?
0.28.1
Other packages
No response
Describe the Bug
When attempting to connect to a PostgreSQL database that is not running, Drizzle ORM does not throw an error as expected. This silent failure makes it difficult to implement proper error handling and could lead to unexpected behavior in production environments.
Current Behavior
No error is thrown when the PostgreSQL server is not running
The application continues to run without indicating connection failure
Expected Behavior
Drizzle should throw an error when unable to establish a connection with PostgreSQL
Connection failure should be immediately apparent
Steps to Reproduce
import { FastifyInstance } from "fastify";
import { drizzle, NodePgDatabase } from "drizzle-orm/node-postgres";
import * as schema from "../db/schema";
import fp from "fastify-plugin";
export type db = NodePgDatabase<typeof schema>;
// TODO: not throwing error when postgres is not running
async function db(app: FastifyInstance) {
const db = drizzle(app.config.DATABASE_URL, {
schema: schema,
});
app.decorate("db", db);
}
export default fp(db);
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.3
What version of
drizzle-kit
are you using?0.28.1
Other packages
No response
Describe the Bug
When attempting to connect to a PostgreSQL database that is not running, Drizzle ORM does not throw an error as expected. This silent failure makes it difficult to implement proper error handling and could lead to unexpected behavior in production environments.
Current Behavior
Expected Behavior
Steps to Reproduce