Skip to content

Commit 6439c8b

Browse files
committed
Generate error when already registered
1 parent bd654ce commit 6439c8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function fastifyPostgres (fastify, options, next) {
3232
fastify.pg[name] = db
3333
} else {
3434
if (fastify.pg) {
35-
console.warn('fastify-postgres has already registered')
35+
next(new Error('fastify-postgres has already registered'))
3636
} else {
3737
fastify.pg = db
3838
}

0 commit comments

Comments
 (0)