Skip to content

fix: BigInt serialization#4

Merged
Crevil merged 1 commit intomainfrom
fix/bigint-serializer
Dec 18, 2025
Merged

fix: BigInt serialization#4
Crevil merged 1 commit intomainfrom
fix/bigint-serializer

Conversation

@Crevil
Copy link
Copy Markdown

@Crevil Crevil commented Dec 18, 2025

This change fixes an issue where logged values containing BigInt would throw an exception because JSON.stringify() does not natively support BigInt.

This occurs when we attempt to log a ConnectRPC request or response value based on an int64/uint64 Protobuf field.

The added jsonStringify function is a small wrapper around JSON.stringify() that safely converts BigInt values to strings. This could potentially cause issues with wire formats, but since we only use this for logging, it shouldn't cause any issues in practice.

This change fixes an issue where logged values containing BigInt would throw an
exception because JSON.stringify() does not natively support BigInt.

This occurs when we attempt to log a ConnectRPC request or response value based
on an int64/uint64 Protobuf field.

The added jsonStringify function is a small wrapper around JSON.stringify() that
safely converts BigInt values to strings. This could potentially cause issues
with wire formats, but since we only use this for logging, it shouldn't cause
any issues in practice.
@Crevil Crevil merged commit 841f6c1 into main Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants