handleFetchTextResponse
Script
v1
Fork
1
2
3
4
5
6
export
let
handleFetchTextResponse
=
async
function
(
response
:
Response
)
{
if
(
response
.
ok
)
{
return
await
response
.
text
(
)
;
}
throw
new
Error
(
await
response
.
text
(
)
)
;
}
;