diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index a7e61d08d..c2de04142 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -22,18 +22,18 @@ const errorIndex = (props)=>{ ## We can't find this brew in Google Drive! This file was saved on Google Drive, but this link doesn't work anymore. - ${ props.brew.authors?.length > 0 - ? `Note that this brew belongs to the Homebrewery account **${ props.brew.authors[0] }**, - ${ props.brew.account - ? `which is + ${props.brew.authors?.length > 0 + ? `Note that this brew belongs to the Homebrewery account **${props.brew.authors[0]}**, + ${props.brew.account + ? `which is ${props.brew.authors[0] == props.brew.account - ? `your account.` - : `not your account (you are currently signed in as **${props.brew.account}**).` - }` - : 'and you are not currently signed in to any account.' - }` - : '' - } + ? `your account.` + : `not your account (you are currently signed in as **${props.brew.account}**).` +}` + : 'and you are not currently signed in to any account.' +}` + : '' +} The Homebrewery cannot delete files from Google Drive on its own, so there are three most likely possibilities: : @@ -75,7 +75,9 @@ const errorIndex = (props)=>{ **Brew Title:** ${props.brew.brewTitle || 'Unable to show title'} - **Current Authors:** ${props.brew.authors?.map((author)=>{return `${author}`;}).join(', ') || 'Unable to list authors'}`, + **Current Authors:** ${props.brew.authors?.map((author)=>{return `${author}`;}).join(', ') || 'Unable to list authors'} + + [Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`, // User is not signed in; must be a user on the Authors List '04' : dedent` 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 }; }