From 901615d99e60f116aded03209f7b34bb39a7d882 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Tue, 10 Jan 2023 21:08:21 -0500 Subject: [PATCH] Remove extra console log for getGoogleBrew App.js already logs the thrown error, so we were getting double logs (and Google errors are long....). This should make the logs a bit easier to sift through. --- server/homebrew.api.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/homebrew.api.js b/server/homebrew.api.js index 56bbb15f4..86352c687 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -54,11 +54,10 @@ const api = { let googleError; const googleBrew = await GoogleActions.getGoogleBrew(googleId || stub?.googleId, id, accessType) .catch((err)=>{ - console.warn(err); googleError = err; }); - // If we can't find the google brew and there is a google id for the brew, throw an error. - if(!googleBrew) throw googleError; + // Throw any error caught while attempting to retrieve Google brew. + if(googleError) throw googleError; // Combine the Homebrewery stub with the google brew, or if the stub doesn't exist just use the google brew stub = stub ? _.assign({ ...api.excludeStubProps(stub), stubbed: true }, api.excludeGoogleProps(googleBrew)) : googleBrew; }