Fix: if the http request failed, the error would be [object Array]
parent
50f9d51489
commit
f1cc532f3d
|
@ -73,7 +73,7 @@ export class Marvin {
|
||||||
}
|
}
|
||||||
return response.text()
|
return response.text()
|
||||||
} else {
|
} else {
|
||||||
throw [response.status, await response.text()]
|
throw new Error(`got http ${response.status}: ${await response.text()}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async test() {
|
async test() {
|
||||||
|
|
Loading…
Reference in New Issue