Skip to content

Commit

Permalink
ensure warnings are not lost
Browse files Browse the repository at this point in the history
  • Loading branch information
appilon committed Apr 8, 2020
1 parent 13b40e5 commit 289255d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/helper/plugin/grpc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *proto.ReadRe
instanceState.Meta = private

newInstanceState, diags := res.RefreshWithoutUpgrade(ctx, instanceState, s.provider.Meta())
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, diags)
if diags.HasError() {
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, diags)
return resp, nil
}

Expand Down Expand Up @@ -1051,8 +1051,8 @@ func (s *GRPCProviderServer) ReadDataSource(ctx context.Context, req *proto.Read

// now we can get the new complete data source
newInstanceState, diags := res.ReadDataApply(ctx, diff, s.provider.Meta())
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, diags)
if diags.HasError() {
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, diags)
return resp, nil
}

Expand Down

0 comments on commit 289255d

Please sign in to comment.