Skip to content

Commit

Permalink
fix: check for OK response when upserting Advanced Config
Browse files Browse the repository at this point in the history
  • Loading branch information
jansyk13 committed Apr 19, 2024
1 parent ecf6f19 commit 7a0b7ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion castai/resource_eviction_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func upsertEvictionConfigs(ctx context.Context, data *schema.ResourceData, meta
"application/json",
bytes.NewReader(evictorAdvancedConfigJson),
)
if err != nil || resp.JSON200 == nil {
if checkErr := sdk.CheckOKResponse(resp, err); checkErr != nil {
log.Printf("[ERROR] Failed to upsert evictor advanced config: %v", err)
return err
}
Expand Down

0 comments on commit 7a0b7ef

Please sign in to comment.