misskey/src/misc/is-duplicate-key-value-erro...

4 lines
117 B
TypeScript

export function isDuplicateKeyValueError(e: Error): boolean {
return e.message.startsWith('duplicate key value');
}