fix: Throw internal error with invalid ACL.

This commit is contained in:
Joachim Van Herwegen
2021-07-15 13:01:44 +02:00
parent d4bb1095c0
commit e43b579ae7
4 changed files with 15 additions and 9 deletions

View File

@@ -48,9 +48,9 @@ export class AclInitializer extends Initializer {
try {
await this.store.setRepresentation(rootAcl, new BasicRepresentation(aclDocument, rootAcl, TEXT_TURTLE));
} catch (error: unknown) {
const msg = `There was an issue initializing the root .acl resource: ${createErrorMessage(error)}`;
this.logger.error(msg);
throw new InternalServerError(msg, { cause: error });
const message = `Issue initializing the root ACL resource: ${createErrorMessage(error)}`;
this.logger.error(message);
throw new InternalServerError(message, { cause: error });
}
}
}