From 828d611f4d0716f3a8f42d3086e334edb653f71d Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Thu, 3 Jul 2025 18:34:48 +0300 Subject: [PATCH] fix(backend/db): set status code 200 when no error in `handleDBError` --- backend/db/db.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/db/db.go b/backend/db/db.go index a535b7f..722947f 100644 --- a/backend/db/db.go +++ b/backend/db/db.go @@ -54,6 +54,7 @@ func transaction(handler func(context.Context, pgx.Tx) (statusCode int, err erro // Handle database error func handleDBError(errIn error) (statusCode int, err error) { if errIn == nil { + statusCode = http.StatusOK return } if errors.Is(errIn, pgx.ErrNoRows) {