refactor
This commit is contained in:
parent
5e198381d3
commit
435945d09d
7 changed files with 19 additions and 16 deletions
|
@ -1,3 +1,3 @@
|
|||
export function isDuplicateKeyValueError(e: Error): boolean {
|
||||
return e.message.startsWith('duplicate key value');
|
||||
export function isDuplicateKeyValueError(e: unknown | Error): boolean {
|
||||
return (e as any).message && (e as Error).message.startsWith('duplicate key value');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue