diff --git a/server/homebrew.api.js b/server/homebrew.api.js index 4cca76193..3e3554b66 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -168,8 +168,7 @@ const api = { const googleBrew = await GoogleActions.getGoogleBrew(oAuth2Client, googleId, id, accessType) .catch((googleError)=>{ - const reason = googleError.errors?.[0].reason; - if(reason == 'notFound') + if(googleError.code === 404 || googleError.status === 404) throw { ...googleError, HBErrorCode: '02', authors: stub?.authors, account: req.account?.username }; else throw { ...googleError, HBErrorCode: '01' };