From b297672058297a20127cb3d42b4be7710cc2ef4b Mon Sep 17 00:00:00 2001 From: abdfaisol Date: Sun, 28 Jun 2026 10:40:15 +0700 Subject: [PATCH] fix: streamline error response for database unavailability --- pkgs/api/_dbs.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/api/_dbs.ts b/pkgs/api/_dbs.ts index 14ef109..5003be1 100644 --- a/pkgs/api/_dbs.ts +++ b/pkgs/api/_dbs.ts @@ -31,8 +31,10 @@ export const _ = { res.send('{status: "unauthorized"}'); } } else { - res.status(503); - res.send('{"status": "database_unavailable", "message": "Database connection not available"}'); + res.sendStatus(503); + res.send( + '{"status": "database_unavailable", "message": "Database connection not available"}', + ); } }, };