Skip to content

Commit

Permalink
Use remoteObjectParseError
Browse files Browse the repository at this point in the history
When the json parsing fails we should work with remoteObjectParseError
so that we can hopefully identify what exactly cannot be parsed.
  • Loading branch information
ankur22 committed Dec 15, 2023
1 parent 7cbd879 commit 3bcb2e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common/remote_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bcb2e2

Please sign in to comment.