Browse Source

Chore: show primary URL on failed fetch

SukkaW 1 year ago
parent
commit
680079c55a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Build/lib/cache-filesystem.ts

+ 2 - 2
Build/lib/cache-filesystem.ts

@@ -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 {
           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);
         }
       }