mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-06 04:32:40 +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) {
|
||||
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