From d10cf9172c933625447d455f6af05999fdf62042 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Fri, 30 Oct 2020 08:45:08 +0100 Subject: [PATCH] fix(@angular-devkit/build-angular): improve network error message during fonts inlining Closes #19259 --- .../build_angular/src/utils/index-file/inline-fonts.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/utils/index-file/inline-fonts.ts b/packages/angular_devkit/build_angular/src/utils/index-file/inline-fonts.ts index 0345a5cddc31..647cb23370c8 100644 --- a/packages/angular_devkit/build_angular/src/utils/index-file/inline-fonts.ts +++ b/packages/angular_devkit/build_angular/src/utils/index-file/inline-fonts.ts @@ -117,7 +117,11 @@ export class InlineFontsProcessor { .on('end', () => resolve(rawResponse)); }, ) - .on('error', e => reject(e)); + .on('error', e => + reject(new Error( + `Inlining of fonts failed. An error has occurred while retrieving ${url} over the internet.\n` + + e.message, + ))); }); if (cacheFontsPath) {