feat: add note length check on note creation

This check throws a MaximumDocumentLengthExceededError, if the configured maxDocumentLength is exceeded by the new note

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-10-02 23:26:50 +02:00
parent 35032eef09
commit 5275f6b876
7 changed files with 30 additions and 4 deletions

View file

@ -55,3 +55,7 @@ export class NoLocalIdentityError extends Error {
export class PasswordTooWeakError extends Error {
name = 'PasswordTooWeakError';
}
export class MaximumDocumentLengthExceededError extends Error {
name = 'MaximumDocumentLengthExceededError';
}