From afd68d912a7f3bbb0330e59941955c0aca68b41f Mon Sep 17 00:00:00 2001 From: Rinat K Date: Tue, 9 Jan 2024 11:44:03 -0600 Subject: [PATCH] Unify message format - capitalize, no extra spaces --- src/lib/client-file-uploader.ts | 4 ++-- src/lib/validations/line-by-line.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/client-file-uploader.ts b/src/lib/client-file-uploader.ts index d1dc9ed5c..33ffbe795 100644 --- a/src/lib/client-file-uploader.ts +++ b/src/lib/client-file-uploader.ts @@ -90,7 +90,7 @@ export const getFileHash = async ( await pipeline( src, dst ); return dst.digest().toString( 'hex' ); } catch ( err ) { - throw new Error( `could not generate file hash: ${ ( err as Error ).message }`, { + throw new Error( `Could not generate file hash: ${ ( err as Error ).message }`, { cause: err, } ); } finally { @@ -106,7 +106,7 @@ const gzipFile = async ( uncompressedFileName: string, compressedFileName: strin createWriteStream( compressedFileName ) ); } catch ( err ) { - throw new Error( `could not compress file: ${ ( err as Error ).message }`, { cause: err } ); + throw new Error( `Could not compress file: ${ ( err as Error ).message }`, { cause: err } ); } }; diff --git a/src/lib/validations/line-by-line.ts b/src/lib/validations/line-by-line.ts index cb2980a0e..e5b298e9c 100644 --- a/src/lib/validations/line-by-line.ts +++ b/src/lib/validations/line-by-line.ts @@ -55,7 +55,7 @@ export async function fileLineValidations( } ); readInterface.on( 'error', ( err: Error ) => { - throw new Error( ` Error validating input file: ${ err.toString() }`, { cause: err } ); + throw new Error( `Error validating input file: ${ err.toString() }`, { cause: err } ); } ); // Block until the processing completes