fix(backend/db): set status code 200 when no error in handleDBError

This commit is contained in:
Masahiko AMANO 2025-07-03 18:34:48 +03:00
parent 82bd446a85
commit 828d611f4d

View File

@ -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) {