(core) Exposing more descriptive errors from exports

Summary:
Exports used to show generic message on error.
Adding error description to the message.

Test Plan: Updated tests

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3157
This commit is contained in:
Jarosław Sadziński
2021-11-29 21:12:45 +01:00
parent 90fdb55bfd
commit 53bdd6c8e1
11 changed files with 75 additions and 93 deletions

View File

@@ -1351,7 +1351,7 @@ export class GranularAccess implements GranularAccessForBundle {
// Look up user information in database.
if (!this._homeDbManager) { throw new Error('database required'); }
const dbUser = linkParameters.aclAsUserId ?
(await this._homeDbManager.getUser(integerParam(linkParameters.aclAsUserId))) :
(await this._homeDbManager.getUser(integerParam(linkParameters.aclAsUserId, 'aclAsUserId'))) :
(await this._homeDbManager.getExistingUserByLogin(linkParameters.aclAsUser));
if (!dbUser && linkParameters.aclAsUser) {
// Look further for the user, in user attribute tables or examples.