The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import {
TwentyOrmException,
TwentyOrmExceptionCode,
} from 'src/engine/twenty-orm/exceptions/twenty-orm.exception';
export const isDuplicateEntryError = (error: unknown): boolean =>
error instanceof TwentyOrmException &&
error.code === TwentyOrmExceptionCode.DUPLICATE_ENTRY_DETECTED;