Skip to content

Commit

Permalink
connectorCreate() can return error when there's a error (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
growingspaghetti authored May 22, 2020
1 parent a1dbe39 commit 42ecded
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion connect/resource_kafka_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ func connectorCreate(d *schema.ResourceData, meta interface{}) error {
d.Set("config", newConfFiltered)
}

if err != nil {
return err
}

return connectorRead(d, meta)
}

Expand Down Expand Up @@ -139,7 +143,6 @@ func connectorRead(d *schema.ResourceData, meta interface{}) error {
//log.Printf("[INFO] Current local config_sensitive values are: %v", sensitiveCache)
conn, err := c.GetConnector(req)


if err == nil {
// we do not want the sensitive values to appear in the non-masked 'config' field
// use cached sensitive values to get the correct keys to remove from the newly read config
Expand Down

0 comments on commit 42ecded

Please sign in to comment.