diff --git a/src/copy.ts b/src/copy.ts index 661ad465..076877a4 100644 --- a/src/copy.ts +++ b/src/copy.ts @@ -38,7 +38,7 @@ export function copyUpdate(event: string, filePath: string, context: BuildContex return copySrcToDest(context, copyOptions.src, copyOptions.dest, copyOptions.filter, true); }); return Promise.all(promises).then((copySrcToDestResults: CopySrcToDestResult[]) => { - printCopyErrorMessages('copy', copySrcToDestResults); + printCopyErrorMessages(copySrcToDestResults); const destFiles = copySrcToDestResults.map(copySrcToDestResult => copySrcToDestResult.dest); emit(EventType.FileChange, destFiles); }); @@ -76,14 +76,14 @@ export function copyWorker(context: BuildContext, configFile: string) { }); return Promise.all(promises).then((copySrcToDestResults: CopySrcToDestResult[]) => { - printCopyErrorMessages('copy', copySrcToDestResults); + printCopyErrorMessages(copySrcToDestResults); }); } -function printCopyErrorMessages(prefix: string, copyResults: CopySrcToDestResult[]) { +function printCopyErrorMessages(copyResults: CopySrcToDestResult[]) { copyResults.forEach(copyResult => { if (!copyResult.success) { - Logger.warn(`${prefix}: ${copyResult.errorMessage}`); + Logger.warn(copyResult.errorMessage); } }); } diff --git a/src/dev-server/notification-server.ts b/src/dev-server/notification-server.ts index 3f93cae0..7071b88e 100644 --- a/src/dev-server/notification-server.ts +++ b/src/dev-server/notification-server.ts @@ -26,7 +26,9 @@ export function createNotificationServer(config: ServeConfig) { try { wsServer.send(JSON.stringify(msg)); } catch (e) { - Logger.error(`error sending client ws, ${e}`); + if (e.message !== 'not opened') { + Logger.error(`error sending client ws - ${e.message}`); + } } } }