1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 export const isUniqName = (error: string) => {
6 return sleep(1000).then(() => {
7 if (error.includes("UniqueViolation")) {
8 throw { error: 'Project with this name already exists.' };
13 const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));