Fix user profile writes on postgres conflicts

This commit is contained in:
IanShaw027
2026-04-21 10:13:28 -07:00
parent 0f4a8d7be8
commit 525a320424
7 changed files with 104 additions and 9 deletions

View File

@@ -0,0 +1,14 @@
package service
import (
"database/sql"
"errors"
"strings"
)
func isSQLNoRowsError(err error) bool {
if err == nil {
return false
}
return errors.Is(err, sql.ErrNoRows) || strings.Contains(err.Error(), "no rows in result set")
}