Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

Commit

Permalink
don't send error to sentry if user is not authorized (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Ivantsov authored Jun 10, 2017
1 parent ffab403 commit 7433dc9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/background/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ async function loadUserInfo() {
yu: cookieUid,
},
});

if (!accounts) {
throw new Error(errors.NOT_AUTHORIZED);
}

const user = accounts.find(item => item.uid === uid);

return {
Expand Down

0 comments on commit 7433dc9

Please sign in to comment.