Fix: better response processing.
This commit is contained in:
parent
f65b6ae876
commit
80a51df1d5
@ -97,14 +97,14 @@ function launchTests (): void {
|
||||
test: test
|
||||
})
|
||||
})
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
return {
|
||||
test: test,
|
||||
messages: ['Unknown error'],
|
||||
messages: [response.statusText ?? 'Unknown error'],
|
||||
ok: false
|
||||
}
|
||||
}
|
||||
const data = await response.json()
|
||||
if ((typeof data) !== 'object') {
|
||||
return {
|
||||
test: test,
|
||||
|
Loading…
x
Reference in New Issue
Block a user