From bca653bc4df772b2eb3597484fefa7c65cede9b2 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 17:52:09 +1300 Subject: [PATCH 1/5] Add instructions to HBErrorCode 01 & 02 --- .../pages/errorPage/errors/errorIndex.js | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 298ec8c7e..ea1843c56 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -6,6 +6,24 @@ const loginUrl = 'https://www.naturalcrit.com/login'; //050-100 : Other pages errors const errorIndex = (props)=>{ + const googleRefreshInstructions = dedent` + : + + ### Refreshing your Google Credentials + + This issue may be caused by an issue with your Google credentials; if so, the following steps may resolve the issue: + + - Go to https://www.naturalcrit.com/login and click logout if present (in small text at the bottom of the page). + + - Click "Sign In with Google", which will refresh your Google credentials. + + - After completing the sign in process, return to Homebrewery and refresh/reload the page so that it can pick up the updated credentials. + + - If this was the source of the issue, it should now be resolved. + + If following these steps does not resolve the issue, please let us know! + `; + return { // Default catch all '00' : dedent` @@ -18,7 +36,9 @@ const errorIndex = (props)=>{ '01' : dedent` ## An error occurred while retrieving this brew from Google Drive! - Google reported an error while attempting to retrieve a brew from this link.`, + Google reported an error while attempting to retrieve a brew from this link.` + + + googleRefreshInstructions, // Google Drive - 404 : brew deleted or access denied '02' : dedent` @@ -65,7 +85,9 @@ const errorIndex = (props)=>{ : Also note, if you prefer not to use your Google Drive for storage, you can always change the storage location of a brew by clicking the Google drive icon by the - brew title and choosing *transfer my brew to/from Google Drive*.`, + brew title and choosing *transfer my brew to/from Google Drive*.` + + + googleRefreshInstructions, // User is not Authors list '03' : dedent` From 91d928fd8a4da7b9a1cec67a41ef1d1adb6cd153 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 17:52:58 +1300 Subject: [PATCH 2/5] End list properly --- client/homebrew/pages/errorPage/errors/errorIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index ea1843c56..e9284a432 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -70,7 +70,7 @@ const errorIndex = (props)=>{ - **The Google Account may be closed.** Google may have removed the account due to inactivity or violating a Google policy. Make sure the owner can still access Google Drive normally and upload/download files to it. - : + If the file isn't found, Google Drive usually puts your file in your Trash folder for 30 days. Assuming the trash hasn't been emptied yet, it might be worth checking. You can also find the Activity tab on the right side of the Google Drive page, which From 9a6cf8c5d212122f607a0ef9dcb23c5723eedabc Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 17:53:14 +1300 Subject: [PATCH 3/5] Linter fix --- client/homebrew/pages/errorPage/errors/errorIndex.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index e9284a432..ee34bac85 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -194,8 +194,8 @@ const errorIndex = (props)=>{ **Brew Title:** ${props.brew.brewTitle}`, - // ####### Admin page error ####### - '52': dedent` + // ####### Admin page error ####### + '52' : dedent` ## Access Denied You need to provide correct administrator credentials to access this page.`, From fcfd3171bd88a69c00558e4ae40ba7293f549bed Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 22 Dec 2024 18:00:27 +1300 Subject: [PATCH 4/5] Tweak start of instructions --- client/homebrew/pages/errorPage/errors/errorIndex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index ee34bac85..198f67cec 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -7,7 +7,7 @@ const loginUrl = 'https://www.naturalcrit.com/login'; const errorIndex = (props)=>{ const googleRefreshInstructions = dedent` - : +   ### Refreshing your Google Credentials From 32561cf368567e16c89ba9988533ded58b8558c0 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 22 Dec 2024 22:19:02 -0500 Subject: [PATCH 5/5] Moving to just HBErrorCode 01 02 is specifically for 404 errors when the file is actually missing. In that case, refreshing credentials probably won't work. (We should update the errorNav to make this distinction as well.) --- .../pages/errorPage/errors/errorIndex.js | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 198f67cec..ccdd86768 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -6,24 +6,6 @@ const loginUrl = 'https://www.naturalcrit.com/login'; //050-100 : Other pages errors const errorIndex = (props)=>{ - const googleRefreshInstructions = dedent` -   - - ### Refreshing your Google Credentials - - This issue may be caused by an issue with your Google credentials; if so, the following steps may resolve the issue: - - - Go to https://www.naturalcrit.com/login and click logout if present (in small text at the bottom of the page). - - - Click "Sign In with Google", which will refresh your Google credentials. - - - After completing the sign in process, return to Homebrewery and refresh/reload the page so that it can pick up the updated credentials. - - - If this was the source of the issue, it should now be resolved. - - If following these steps does not resolve the issue, please let us know! - `; - return { // Default catch all '00' : dedent` @@ -36,9 +18,18 @@ const errorIndex = (props)=>{ '01' : dedent` ## An error occurred while retrieving this brew from Google Drive! - Google reported an error while attempting to retrieve a brew from this link.` + Google is able to see the brew at this link, but reported an error while attempting to retrieve it. - + googleRefreshInstructions, + ### Refreshing your Google Credentials + + This issue is likely caused by an issue with your Google credentials; if you are the owner of this file, the following steps may resolve the issue: + + - Go to https://www.naturalcrit.com/login and click logout if present (in small text at the bottom of the page). + - Click "Sign In with Google", which will refresh your Google credentials. + - After completing the sign in process, return to Homebrewery and refresh/reload the page so that it can pick up the updated credentials. + - If this was the source of the issue, it should now be resolved. + + If following these steps does not resolve the issue, please let us know!`, // Google Drive - 404 : brew deleted or access denied '02' : dedent` @@ -85,9 +76,7 @@ const errorIndex = (props)=>{ : Also note, if you prefer not to use your Google Drive for storage, you can always change the storage location of a brew by clicking the Google drive icon by the - brew title and choosing *transfer my brew to/from Google Drive*.` - - + googleRefreshInstructions, + brew title and choosing *transfer my brew to/from Google Drive*.`, // User is not Authors list '03' : dedent`