From 0845234f2f3dc2c3bae1ca1a1c8a9b10ded55f98 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sat, 14 Oct 2023 19:59:51 +1300 Subject: [PATCH] Add brew's shareId to error info --- server/homebrew.api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/homebrew.api.js b/server/homebrew.api.js index b394b2ee7..20e13ec71 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -79,7 +79,7 @@ const api = { if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) { const accessError = { name: 'Access Error', status: 401 }; if(req.account){ - throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title }; + throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title, shareId: stub.shareId }; } throw { ...accessError, message: 'User is not logged in', HBErrorCode: '04', authors: stub.authors, brewTitle: stub.title }; }