Skip to content

Commit

Permalink
fix: potential buffer string interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Nov 7, 2024
1 parent d2da909 commit 7b72c17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/node_byte_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/web_byte_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7b72c17

Please sign in to comment.