Chore: show primary URL on failed fetch

This commit is contained in:
SukkaW 2025-01-02 23:44:31 +08:00
parent c6f684c886
commit 680079c55a

View File

@ -398,7 +398,7 @@ export class Cache<S = string> {
} }
} }
console.log(picocolors.red('[fetch error]'), picocolors.gray(error.url), error); console.log(picocolors.red('[fetch error]'), picocolors.gray(`[${primaryUrl}]`), error);
} }
} else { } else {
if ('name' in e) { if ('name' in e) {
@ -418,7 +418,7 @@ export class Cache<S = string> {
} }
} }
console.log(picocolors.red('[fetch error]'), picocolors.gray(primaryUrl), e); console.log(picocolors.red('[fetch error]'), picocolors.gray(`[${primaryUrl}]`), e);
} }
} }