Skip to content

Commit 52e0592

Browse files
committed
fix: pass error data to a metadata field in JS SDK
1 parent 48c967d commit 52e0592

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/js-dash-sdk/src/SDK/Client/Platform/broadcastStateTransition.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ export default async function broadcastStateTransition(
8989
// instead of passing it as GrpcError constructor argument
9090
// Otherwise it will be converted to grpc-js metadata
9191
// Which is not compatible with web
92-
grpcError.metadata = error.data;
92+
grpcError.metadata = {
93+
'dash-serialized-consensus-error-bin': error.data,
94+
};
9395

9496
let cause = await createGrpcTransportError(grpcError);
9597

0 commit comments

Comments
 (0)