From b1ead78e34abcf5e1701df27f9b7653a00f2e989 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 19 Oct 2018 09:15:42 -0400 Subject: [PATCH] throw error if trying to edit cipher with collection ids --- src/services/cipher.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/cipher.service.ts b/src/services/cipher.service.ts index ee696faa22..d53c5a0a66 100644 --- a/src/services/cipher.service.ts +++ b/src/services/cipher.service.ts @@ -451,6 +451,9 @@ export class CipherService implements CipherServiceAbstraction { } cipher.id = response.id; } else { + if (collectionIds != null) { + throw new Error('You cannot edit with collection ids.'); + } const request = new CipherRequest(cipher); response = await this.apiService.putCipher(cipher.id, request); }