From 3e276bc5021f6034c8cf9f43917e7512a1bf7894 Mon Sep 17 00:00:00 2001 From: Chris Pauley Date: Mon, 2 Oct 2017 10:54:12 -0700 Subject: [PATCH] empty catch statements don't resolve, breaking behavior if can't create orphan --- app/components/Authentication/Token/Token.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Authentication/Token/Token.jsx b/app/components/Authentication/Token/Token.jsx index a2eb35b..3c999a7 100644 --- a/app/components/Authentication/Token/Token.jsx +++ b/app/components/Authentication/Token/Token.jsx @@ -347,13 +347,13 @@ export default class TokenAuthBackend extends React.Component { // User doesnt have sudo, use user assigned policies let p1 = callVaultApi('get', 'auth/token/lookup-self').then((resp) => { this.setState({ newTokenAvailablePolicies: resp.data.data.policies }); - }).catch(); // <- This shouldnt have failed + }).catch(() => {}); // <- This shouldnt have failed // Altough sudo was not granted, we could still create orphans using a different endpoint let p2 = tokenHasCapabilities(['update'], 'auth/token/create-orphan').then(() => { // Turns out we can this.setState({ 'canCreateOrphan': 'create_orphan' }); - }).catch(); // <- Nothing we can really do at this point + }).catch(() => {}); // <- Nothing we can really do at this point return Promise.all([p1, p2]); });