X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/50ec33497a4b0a9d6f262fa5a0176f2952ec1f6c..65473dca3509b72453f430c5ce6e69fe97961d08:/src/services/common-service/common-resource-service.ts diff --git a/src/services/common-service/common-resource-service.ts b/src/services/common-service/common-resource-service.ts index d9be8dae9f..515eb6a4b9 100644 --- a/src/services/common-service/common-resource-service.ts +++ b/src/services/common-service/common-resource-service.ts @@ -13,6 +13,7 @@ export enum CommonResourceServiceError { OWNERSHIP_CYCLE = 'OwnershipCycle', MODIFYING_CONTAINER_REQUEST_FINAL_STATE = 'ModifyingContainerRequestFinalState', NAME_HAS_ALREADY_BEEN_TAKEN = 'NameHasAlreadyBeenTaken', + PERMISSION_ERROR_FORBIDDEN = 'PermissionErrorForbidden', UNKNOWN = 'Unknown', NONE = 'None' } @@ -64,11 +65,11 @@ export const getCommonResourceServiceError = (errorResponse: any) => { return CommonResourceServiceError.MODIFYING_CONTAINER_REQUEST_FINAL_STATE; case /Name has already been taken/.test(error): return CommonResourceServiceError.NAME_HAS_ALREADY_BEEN_TAKEN; + case /403 Forbidden/.test(error): + return CommonResourceServiceError.PERMISSION_ERROR_FORBIDDEN; default: return CommonResourceServiceError.UNKNOWN; } } return CommonResourceServiceError.NONE; }; - -