Fix: if the http request failed, the error would be [object Array]

main
Yorick van Pelt 2023-06-26 15:52:08 +02:00
parent 50f9d51489
commit f1cc532f3d
Signed by: yorick
GPG Key ID: D8D3CC6D951384DE
1 changed files with 1 additions and 1 deletions

View File

@ -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() {