aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-09-14 14:09:34 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-09-14 14:09:34 -0500
commit90d13416d6c73bb86498fd7a6a8767ed5a1dcacc (patch)
tree87db75d2064ddd7644db7f737a65415010e5bd4f /src
parent70b143356f44d5be9bb8eb0bff3989588501d5ad (diff)
downloadslskd-90d13416d6c73bb86498fd7a6a8767ed5a1dcacc.tar.gz
don't set error if state fetch returns 401
Diffstat (limited to 'src')
-rw-r--r--src/web/src/components/App.js5
1 files changed, 3 insertions, 2 deletions
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 })
}
};