Skip to content

Commit 823f711

Browse files
committed
fix: error message for bigint
1 parent ed8171f commit 823f711

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parser/serializer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ export function serializeInto(
807807
} else if (typeof value === 'number') {
808808
index = serializeNumber(buffer, key, value, index, true);
809809
} else if (typeof value === 'bigint') {
810-
throw new TypeError('Do not know how to serialize a BigInt, please use Decimal128');
810+
throw new TypeError('Unsupported type BigInt, please use Decimal128');
811811
} else if (typeof value === 'boolean') {
812812
index = serializeBoolean(buffer, key, value, index, true);
813813
} else if (value instanceof Date || isDate(value)) {
@@ -915,7 +915,7 @@ export function serializeInto(
915915
} else if (type === 'number') {
916916
index = serializeNumber(buffer, key, value, index);
917917
} else if (type === 'bigint' || isBigInt64Array(value) || isBigUInt64Array(value)) {
918-
throw new TypeError('Do not know how to serialize a BigInt, please use Decimal128');
918+
throw new TypeError('Unsupported type BigInt, please use Decimal128');
919919
} else if (type === 'boolean') {
920920
index = serializeBoolean(buffer, key, value, index);
921921
} else if (value instanceof Date || isDate(value)) {
@@ -1019,7 +1019,7 @@ export function serializeInto(
10191019
} else if (type === 'number') {
10201020
index = serializeNumber(buffer, key, value, index);
10211021
} else if (type === 'bigint') {
1022-
throw new TypeError('Do not know how to serialize a BigInt, please use Decimal128');
1022+
throw new TypeError('Unsupported type BigInt, please use Decimal128');
10231023
} else if (type === 'boolean') {
10241024
index = serializeBoolean(buffer, key, value, index);
10251025
} else if (value instanceof Date || isDate(value)) {

0 commit comments

Comments
 (0)