Skip to content

Commit

Permalink
chore: remove try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
melsener committed Mar 7, 2024
1 parent b28a27c commit b968475
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 7 additions & 3 deletions src/client/containers/LoginContainer/LoginContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ export const LoginContainer: FunctionComponent = () => {
const { isInitializeLoading } = useInitialize();
const [login, { loginError }] = useLogin({
onSuccess: async (code?: string) => {
const { accessToken, refreshToken } = await requester.createAuthToken(String(code));
storage.setAccessToken(accessToken);
storage.setRefreshToken(refreshToken);
try {
const { accessToken, refreshToken } = await requester.createAuthToken(String(code));
storage.setAccessToken(accessToken);
storage.setRefreshToken(refreshToken);
} catch (err) {
// TODO: log to sentry
}
replace(id
? url.getConfigurationUpdateUrl({
channel: channel as string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ export const ZeplinAuthEndContainer: FunctionComponent = () => {
return;
}

try {
microsoftTeams.authentication.notifySuccess(code as string);
} catch (tokenError) {
microsoftTeams.authentication.notifyFailure((tokenError as Error)?.message ?? `Unknown error ${tokenError}`);
}
microsoftTeams.authentication.notifySuccess(code as string);
});
}, []);

Expand Down

0 comments on commit b968475

Please sign in to comment.