You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
All: Testing and better handling of E2EE initialisation
This commit is contained in:
@ -82,7 +82,11 @@ class EncryptionService {
|
||||
}
|
||||
|
||||
activeMasterKeyId() {
|
||||
if (!this.activeMasterKeyId_) throw new Error('No master key is defined as active');
|
||||
if (!this.activeMasterKeyId_) {
|
||||
const error = new Error('No master key is defined as active. Check this: Either one or more master keys exist but no password was provided for any of them. Or no master key exist. Or master keys and password exist, but none was set as active.');
|
||||
error.code = 'noActiveMasterKey';
|
||||
throw error;
|
||||
}
|
||||
return this.activeMasterKeyId_;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user