export function isAlreadyExistsError ( error ) { return `${ error . code }` === '42P07' || `${ error . code }` === '23505' ; } export function isNotExistError ( error ) { return `${ error . code }` === '42P01' ; }