From 6f541cab37293d5ac1da22749160ceb4c2616925 Mon Sep 17 00:00:00 2001 From: Amit Shani Date: Mon, 19 Sep 2022 10:44:32 +0300 Subject: [PATCH] small fix --- port/cli/entity.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/port/cli/entity.go b/port/cli/entity.go index 8ff582f7..77e11565 100644 --- a/port/cli/entity.go +++ b/port/cli/entity.go @@ -22,6 +22,9 @@ func (c *PortClient) ReadEntity(ctx context.Context, id string, blueprint string if err != nil { return nil, err } + if !pb.OK { + return nil, fmt.Errorf("failed to read entity, got: %s", resp.Body()) + } return &pb.Entity, nil }