teqo-backup/src/utilities/supporter/supporterErrors.ts
Francisco Ignácio Fontoura Solla 4806c417c8 Engineering Pass 3: consolidate patterns and lock them with guards.
Fold duplicated campanha access, loaders, list/filter/form shells, and scripts into shared modules; reorganize utilities by domain; stabilize e2e; and document prevention-first audit workflow so the same smells cannot creep back in.
2026-07-29 06:11:29 -03:00

6 lines
279 B
TypeScript

export const isUniqueSupporterConflict = (error: unknown): boolean => {
const message = error instanceof Error ? error.message : String(error)
return /supporter.*contact.*municipality|supporter_contact_municipality|nulls_not_distinct|duplicate key/i.test(
message,
)
}