From 5aedac159c788c8812c84a339d7dba1550ff5c21 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Mon, 29 Jan 2024 09:52:52 +0000 Subject: [PATCH] Add unmarshalable value in error message --- common/remote_object.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/remote_object.go b/common/remote_object.go index 1911897fd..6a8cf0b33 100644 --- a/common/remote_object.go +++ b/common/remote_object.go @@ -243,7 +243,7 @@ func parseConsoleRemoteObjectPreview(logger *log.Logger, op *cdpruntime.ObjectPr bb, err := json.Marshal(obj) if err != nil { - return "", fmt.Errorf("marshaling object to string: %w", err) + return "", fmt.Errorf("marshaling object %q to string: %w", obj, err) } return string(bb), nil @@ -265,7 +265,7 @@ func parseConsoleRemoteArrayPreview(logger *log.Logger, op *cdpruntime.ObjectPre bb, err := json.Marshal(arr) if err != nil { - return "", fmt.Errorf("marshaling array to string: %w", err) + return "", fmt.Errorf("marshaling array %q to string: %w", arr, err) } return string(bb), nil