summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-04-25 11:06:42 +0200
committerErnst Widerberg <ernst@sunet.se>2022-04-25 11:06:42 +0200
commitfffdd065235e2c2da859448fb9f6231f58f15e69 (patch)
tree5ddc258f2c6df03b2c5a0fb84fa59cbd49f13349
parentb5c603f9d4fd4d1f96a3f7e529295b4cfb624f5d (diff)
Only consider return code from collector
-rw-r--r--src/components/ListView.js5
-rw-r--r--src/components/ScanView.js5
2 files changed, 0 insertions, 10 deletions
diff --git a/src/components/ListView.js b/src/components/ListView.js
index 409c802..55d137e 100644
--- a/src/components/ListView.js
+++ b/src/components/ListView.js
@@ -62,7 +62,6 @@ class ListView extends React.Component {
}
}
)
- // TODO: Look at `status` or return code or both?
.then(resp => {
if (resp.status !== 200)
throw new Error(
@@ -74,10 +73,6 @@ class ListView extends React.Component {
return resp.json();
})
.then(json => {
- if (json.status != "success")
- throw new Error(
- `Unexpected status from soc_collector: ${json.status}`
- );
this.setState({
scans: json.docs.map(d => ({
...d,
diff --git a/src/components/ScanView.js b/src/components/ScanView.js
index 9fe57d7..a289cf7 100644
--- a/src/components/ScanView.js
+++ b/src/components/ScanView.js
@@ -25,7 +25,6 @@ class ScanView extends React.Component {
}
}
)
- // TODO: Look at `status` or return code or both?
.then(resp => {
if (resp.status !== 200)
throw new Error(
@@ -34,10 +33,6 @@ class ScanView extends React.Component {
return resp.json();
})
.then(json => {
- if (json.status != "success")
- throw new Error(
- `Unexpected status from soc_collector: ${json.status}`
- );
this.setState({
object: {
...json.docs,