Skip to content

Commit 2058caa

Browse files
committed
Display error message on analysis fail
1 parent 58eafe9 commit 2058caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/analysisPoller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ async function getStatus (uuid, accessToken, apiUrl) {
9292
}
9393
})
9494
await handleErrors(res, accessToken, uuid)
95-
const { status } = await res.json()
95+
const { status, error } = await res.json()
9696
switch (status) {
9797
case 'Finished': break
9898
/* eslint-disable no-throw-literal */
99-
case 'Error': throw 'Analysis failed'
99+
case 'Error': throw 'Analysis failed: ' + error
100100
/* eslint-enable no-throw-literal */
101101
default: return [status, null]
102102
}

0 commit comments

Comments
 (0)