Skip to content

Commit

Permalink
fix a potenial crash for (#24083)
Browse files Browse the repository at this point in the history
`azurerm_mobile_network_packet_core_control_plane`
  • Loading branch information
ziyeqf authored Dec 4, 2023
1 parent 1ad00ff commit 5991864
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ func (r PacketCoreControlPlaneResource) Delete() sdk.ResourceFunc {
Refresh: func() (result interface{}, state string, err error) {
resp, err := client.Delete(ctx, *id)
if err != nil {
if resp.HttpResponse == nil {
return nil, "", fmt.Errorf("HTTP response was nil")
}
if resp.HttpResponse.StatusCode == http.StatusConflict {
return nil, "409", nil
}
Expand Down

0 comments on commit 5991864

Please sign in to comment.