Change code to throw Error

This commit is contained in:
슈리튬
2021-09-04 20:38:39 +09:00
committed by GitHub
parent e57181684f
commit 37fc409321

View File

@@ -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}`)
}