From cbe86a91b461589b2f310b2ee40153a699754784 Mon Sep 17 00:00:00 2001 From: Overbool Date: Fri, 14 Sep 2018 23:08:22 +0800 Subject: [PATCH] fix(object): print object diff error License: MIT Signed-off-by: Overbool --- core/commands/object/diff.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/commands/object/diff.go b/core/commands/object/diff.go index 9ddc7880671..dd2a6e3ffe9 100644 --- a/core/commands/object/diff.go +++ b/core/commands/object/diff.go @@ -74,6 +74,10 @@ Example: } changes, err := api.Object().Diff(req.Context(), pa, pb) + if err != nil { + res.SetError(err, cmdkit.ErrNormal) + return + } out := make([]*dagutils.Change, len(changes)) for i, change := range changes {