fix(backend/db): set status code 200 when no error in handleDBError
This commit is contained in:
parent
82bd446a85
commit
828d611f4d
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user