mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Change code to throw Error
This commit is contained in:
@@ -5,5 +5,5 @@ export async function url_get (url : string, options? : OptionsOfTextResponseBod
|
|||||||
if(response.statusCode === 200) {
|
if(response.statusCode === 200) {
|
||||||
return response.body
|
return response.body
|
||||||
}
|
}
|
||||||
else throw `Got ${response.statusCode} from ${url}`
|
else throw new Error(`Got ${response.statusCode} from ${url}`)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user