Skip to content

Commit

Permalink
bugfix/issues-785-log waring if variable id null (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuyPhanNguyen authored Sep 30, 2024
1 parent 4c0f227 commit d2f1fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octopusdeploy_framework/resource_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func (r *variableTypeResource) Read(ctx context.Context, req resource.ReadReques
if apiError != nil {
resp.Diagnostics.AddError("unable to load variable", apiError.Error())
} else {
// If this is a non-API error
resp.Diagnostics.AddError(fmt.Sprintf("Error loading %s", schemas.VariableResourceDescription), err.Error())
// If this is a non-API error just log warning and return early
resp.Diagnostics.AddWarning(fmt.Sprintf("Error loading %s, with variable Id [%s]", schemas.VariableResourceDescription, data.ID.ValueString()), err.Error())
}
return
}
Expand Down

0 comments on commit d2f1fd3

Please sign in to comment.