From 6e37e2e50d2cb4b945964c900b2bd24d39095a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 13 Oct 2026 13:25:22 +0200 Subject: [PATCH 1/3] fix error crash with vault if server error --- .../pages/errorPage/errors/errorIndex.js | 2 +- client/homebrew/pages/vaultPage/vaultPage.jsx | 25 ++++++++++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 065512462..f4f3885dc 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -41,7 +41,7 @@ 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 + ${props?.brew?.authors?.length > 0 ? `Note that this brew belongs to the Homebrewery account **${props.brew.authors[0]}**, ${props.brew.account ? `which is diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index 682630b6f..aa1cb5679 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -74,8 +74,11 @@ const VaultPage = (props)=>{ updateStateWithBrews([], 1); }); - if(response.ok) + if(response?.ok) updateStateWithBrews(response.body.brews, page); + else { + console.log('response: ', response); + } }; const loadTotal = async (title, author, v3, legacy)=>{ @@ -364,13 +367,23 @@ const VaultPage = (props)=>{ } if(error) { - const errorText = ErrorIndex()[error.HBErrorCode.toString()] || ''; + if(error.HBErrorCode === undefined) { + return ( +
+

{error.toString()}

+
+ ) + } else { - return ( -
+ const errorText = ErrorIndex()[error.HBErrorCode.toString()] || ''; + + return ( +

Error: {errorText}

-
- ); +
+ ); + } + } if(!brewCollection) { From eed69eb8b145138f172321e80a477976244510fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 13 Oct 2026 13:26:24 +0200 Subject: [PATCH 2/3] undo errorindex commit --- 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 f4f3885dc..065512462 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -41,7 +41,7 @@ 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 + ${props.brew.authors?.length > 0 ? `Note that this brew belongs to the Homebrewery account **${props.brew.authors[0]}**, ${props.brew.account ? `which is From 1f98e6be911aa399ec6c9553e3b98cff17c3edc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Tue, 13 Oct 2026 13:27:04 +0200 Subject: [PATCH 3/3] just fix the error nothing else yet --- client/homebrew/pages/vaultPage/vaultPage.jsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/client/homebrew/pages/vaultPage/vaultPage.jsx b/client/homebrew/pages/vaultPage/vaultPage.jsx index aa1cb5679..c76505c7b 100644 --- a/client/homebrew/pages/vaultPage/vaultPage.jsx +++ b/client/homebrew/pages/vaultPage/vaultPage.jsx @@ -76,9 +76,6 @@ const VaultPage = (props)=>{ if(response?.ok) updateStateWithBrews(response.body.brews, page); - else { - console.log('response: ', response); - } }; const loadTotal = async (title, author, v3, legacy)=>{