Skip to content

Commit

Permalink
Add error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
840 committed Sep 4, 2024
1 parent f67c84c commit 8dd32ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mws/resource_mws_budget.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func ResourceMwsBudget() common.Resource {
},
Read: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error {
_, id, err := p.Unpack(d)
if err != nil {
return err
}
acc, err := c.AccountClient()
if err != nil {
return err
Expand All @@ -50,6 +53,9 @@ func ResourceMwsBudget() common.Resource {
Update: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error {
var update billing.UpdateBudgetConfigurationBudget
_, id, err := p.Unpack(d)
if err != nil {
return err
}
common.DataToStructPointer(d, s, &update)
acc, err := c.AccountClient()
if err != nil {
Expand All @@ -66,6 +72,9 @@ func ResourceMwsBudget() common.Resource {
},
Delete: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error {
_, id, err := p.Unpack(d)
if err != nil {
return err
}
acc, err := c.AccountClient()
if err != nil {
return err
Expand Down

0 comments on commit 8dd32ff

Please sign in to comment.