From ce538ebbfdf9070d4b1692ddfc3c01c2de2a2d10 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Tue, 20 Jun 2023 13:44:41 +1200 Subject: [PATCH] Add errorIndex.json --- client/homebrew/pages/errorPage/errors/errorIndex.json | 3 +++ server/app.js | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 client/homebrew/pages/errorPage/errors/errorIndex.json diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.json b/client/homebrew/pages/errorPage/errors/errorIndex.json new file mode 100644 index 000000000..1d8fb35d5 --- /dev/null +++ b/client/homebrew/pages/errorPage/errors/errorIndex.json @@ -0,0 +1,3 @@ +{ + "404" : "## Your brew is not here.\n\nThis error tells us your file was saved on your Google Drive, but the link you tried to open doesn't work anymore. Since the Homebrewery cannot delete your your personal files from Google Drive without you clicking the delete button, there are three most likely possibilities:\n\n- You have accidentally deleted the Google Drive files. Look on your Google Drive and make sure the Homebrewery folder is still there, and that it holds your brews as text files.\n\n- You have accidentally changed the sharing settings for your files. If the files are still on Google Drive, change all of them to be shared **with everyone who has the link** so the Homebrewery can access them.\n\n- Rarely, it might mean that your Google Account is full or has been closed by Google (for inactivity, violating some policy of theirs). Make sure you can still access your Google Drive normally and upload/download files to it.\n\nIf you can't find it, Google Drive usually puts your file in your Trash folder for 30 days. Assuming you didn't empty the trash right after, it might be worth checking. You can also look on the right side of the page while logged into Google Drive and look at the Activity tab. This can help you pin down the exact date the brew was deleted and by whom.\n\nIf you still can't find it, some people have had success asking Google to recover accidentally deleted files. You can visit this link https://support.google.com/drive/answer/1716222?hl=en&ref_topic=7000946.\n\nAt the bottom of the page there is a button that says **Send yourself an Email** and you will receive instructions on how to request the files be restored.\n\nAlso note, at no point are you 'forced' to save your files on Google Drive. You can always set any brew to be stored on your own Google Drive, or on the Homebrewery servers, by clicking the Google drive icon by the brew title and choosing **transfer my brew to/from Google Drive**." +} \ No newline at end of file diff --git a/server/app.js b/server/app.js index e292831ca..face33efe 100644 --- a/server/app.js +++ b/server/app.js @@ -398,12 +398,9 @@ app.get('/account', asyncHandler(async (req, res, next)=>{ })); app.get('/error', (req, res, next)=>{ - console.log('ERROR PAGE'); - const errorCookie = JSON.parse(req.cookies['HOMEBREWERY_Error']) || {}; + const errorCookie = JSON.parse(req.cookies['HOMEBREWERY_Error']); if(errorCookie){ res.cookie('HOMEBREWERY_Error', '', { maxAge: 0 }); } - console.log(errorCookie); - req.ogMeta = errorCookie.ogMeta; req.brew = errorCookie.error;