Skip to content

Commit

Permalink
fix: handle error when no aws secrets provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozwiaczek committed Dec 10, 2020
1 parent 9f28fd2 commit 7a93c40
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/providers/IntentbaseProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ export const IntentbaseProvider: FC<IntentbaseProps> = ({
return null;
}

configureAmplify(awsCognitoRegion, awsCognitoUserPoolId, awsCognitoUserPoolWebClientId);
try {
configureAmplify(awsCognitoRegion, awsCognitoUserPoolId, awsCognitoUserPoolWebClientId);
} catch (error) {
if (environment !== 'production') {
console.error('AWS Secrets required');
}
}

const defaultFetchUser = async (user?: any) => user;

Expand Down

0 comments on commit 7a93c40

Please sign in to comment.