ch logika
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
2026-09-18 11:53:37 +05:00
parent e0d03730de
commit d3e188affe
28 changed files with 405 additions and 656 deletions

View File

@@ -290,8 +290,11 @@ func (h *handler) delete(c *gin.Context) {
}
func isClientError(err error) bool {
switch err.Error() {
case "province not found", "unsupported region", "could not generate a unique branch code, try again":
switch {
case err.Error() == "province not found",
err.Error() == "unsupported region",
err.Error() == "unique code already exists",
strings.HasPrefix(err.Error(), "unique code must start with"):
return true
default:
return false