mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-06 04:32:40 +00:00
reject Error updated
This commit is contained in:
@@ -36,7 +36,7 @@ export async function request(url : string, options? : RequestOpts): Promise<str
|
|||||||
res = await https_getter(res.headers.location as string , options)
|
res = await https_getter(res.headers.location as string , options)
|
||||||
}
|
}
|
||||||
else if(Number(res.statusCode) > 400){
|
else if(Number(res.statusCode) > 400){
|
||||||
reject(`Got ${res.statusCode} from the request`)
|
reject(new Error(`Got ${res.statusCode} from the request`))
|
||||||
}
|
}
|
||||||
res.setEncoding('utf-8')
|
res.setEncoding('utf-8')
|
||||||
res.on('data', (c) => data+=c)
|
res.on('data', (c) => data+=c)
|
||||||
|
|||||||
Reference in New Issue
Block a user