From 90d13416d6c73bb86498fd7a6a8767ed5a1dcacc Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 14 Sep 2021 14:09:34 -0500 Subject: don't set error if state fetch returns 401 --- src/web/src/components/App.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/web/src/components/App.js b/src/web/src/components/App.js index 2f2cab7d..ab45439b 100644 --- a/src/web/src/components/App.js +++ b/src/web/src/components/App.js @@ -44,12 +44,13 @@ class App extends Component { const { login } = this.state; try { - await this.fetchApplicationState(); const securityEnabled = await session.getSecurityEnabled(); if (!securityEnabled) { this.setToken(sessionStorage, tokenPassthroughValue) } + + await this.fetchApplicationState(); this.setState({ token: this.getToken(), @@ -123,7 +124,7 @@ class App extends Component { error: false, }); } catch (err) { - this.setState({ error: true }) + this.setState({ error: err?.response?.status !== 401 }) } }; -- cgit v1.2.3