creating and deleting repos
[arvados-workbench2.git] / src / services / common-service / common-resource-service.ts
index 70c1df0e2bc5e665a3c62c05b39b7a50a6705c62..6114c560526e7b598c033b0a9c6ae4435bd10047 100644 (file)
@@ -35,6 +35,7 @@ export enum CommonResourceServiceError {
     UNIQUE_VIOLATION = 'UniqueViolation',
     OWNERSHIP_CYCLE = 'OwnershipCycle',
     MODIFYING_CONTAINER_REQUEST_FINAL_STATE = 'ModifyingContainerRequestFinalState',
+    NAME_HAS_ALREADY_BEEN_TAKEN = 'NameHasAlreadyBeenTaken',
     UNKNOWN = 'Unknown',
     NONE = 'None'
 }
@@ -150,6 +151,8 @@ export const getCommonResourceServiceError = (errorResponse: any) => {
                 return CommonResourceServiceError.OWNERSHIP_CYCLE;
             case /Mounts cannot be modified in state 'Final'/.test(error):
                 return CommonResourceServiceError.MODIFYING_CONTAINER_REQUEST_FINAL_STATE;
+            case /Name has already been taken/.test(error):
+                return CommonResourceServiceError.NAME_HAS_ALREADY_BEEN_TAKEN;
             default:
                 return CommonResourceServiceError.UNKNOWN;
         }