(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

@@ -228,7 +228,7 @@ export class Housekeeper {
if (userId !== this._dbManager.getSupportUserId()) {
throw new ApiError('access denied', 403);
}
const docId = stringParam(req.params.docId);
const docId = stringParam(req.params.docId, 'docId');
const permitKey = await this._permitStore.setPermit({docId});
try {
const result = await callback(docId, {