Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

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 4c790be commit 802527b
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 802527b

Please sign in to comment.