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 12, 2023
1 parent 15b77ce commit f3e332c
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 f3e332c

Please sign in to comment.