This commit is contained in:
手瓜一十雪 2024-11-14 12:22:28 +08:00
parent 8bd6f8397b
commit 4bb03ae5ba
2 changed files with 4 additions and 4 deletions

View File

@ -64,11 +64,11 @@ export class HighwayHttpUploader extends IHighwayUploader {
});
});
req.write(frame);
req.on('error', (error) => {
req.on('error', (error: Error) => {
reject(error);
});
} catch (error) {
reject(error);
} catch (error: unknown) {
reject(new Error((error as Error).message));
}
});
}

View File

@ -39,7 +39,7 @@ export function calculateSha1StreamBytes(filePath: string): Promise<Buffer[]> {
calculateStreamBytes.on('end', () => {
resolve(byteArrayList);
});
calculateStreamBytes.on('error', (err) => {
calculateStreamBytes.on('error', (err: Error) => {
reject(err);
});
readable.pipe(calculateStreamBytes);