Skip to content

Commit

Permalink
Add unmarshalable value in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed Jan 29, 2024
1 parent fc47e2e commit b0f41e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/remote_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b0f41e7

Please sign in to comment.