From 3bcb2e2882d90d1378cb99a633669d0449c95dfa Mon Sep 17 00:00:00 2001 From: ankur22 Date: Tue, 12 Dec 2023 10:54:07 +0000 Subject: [PATCH] Use remoteObjectParseError When the json parsing fails we should work with remoteObjectParseError so that we can hopefully identify what exactly cannot be parsed. --- common/remote_object.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/remote_object.go b/common/remote_object.go index 6f23e9299..6f8559f80 100644 --- a/common/remote_object.go +++ b/common/remote_object.go @@ -160,7 +160,12 @@ func parseRemoteObjectValue( var v any if err := json.Unmarshal([]byte(val), &v); err != nil { - return nil, err + return nil, &remoteObjectParseError{ + error: err, + typ: string(t), + subType: string(st), + val: val, + } } return v, nil