diff --git a/src/utils/node_byte_utils.ts b/src/utils/node_byte_utils.ts index ca1482ca..7836345f 100644 --- a/src/utils/node_byte_utils.ts +++ b/src/utils/node_byte_utils.ts @@ -83,7 +83,7 @@ export const nodeJsByteUtils = { return Buffer.from(potentialBuffer); } - throw new BSONError(`Cannot create Buffer from ${String(potentialBuffer)}`); + throw new BSONError(`Cannot create Buffer from the passed potentialBuffer.`); }, allocate(size: number): NodeJsBuffer { diff --git a/src/utils/web_byte_utils.ts b/src/utils/web_byte_utils.ts index 0f79f0df..9d9c343f 100644 --- a/src/utils/web_byte_utils.ts +++ b/src/utils/web_byte_utils.ts @@ -100,7 +100,7 @@ export const webByteUtils = { return new Uint8Array(potentialUint8array); } - throw new BSONError(`Cannot make a Uint8Array from ${String(potentialUint8array)}`); + throw new BSONError(`Cannot make a Uint8Array from passed potentialBuffer.`); }, allocate(size: number): Uint8Array {