Chore: make ESLint and TypeScript happy

This commit is contained in:
SukkaW
2025-08-07 22:28:15 +08:00
parent ce924cfd2e
commit 807fc19a46
7 changed files with 188 additions and 189 deletions

View File

@@ -139,10 +139,6 @@ export class ResponseError<T extends UndiciResponseData | Response> extends Erro
const statusCode = 'statusCode' in res ? res.statusCode : res.status;
super('HTTP ' + statusCode + ' ' + args.map(_ => inspect(_)).join(' '));
if ('captureStackTrace' in Error) {
Error.captureStackTrace(this, ResponseError);
}
// eslint-disable-next-line sukka/unicorn/custom-error-definition -- deliberatly use previous name
this.name = this.constructor.name;
this.res = res;