EmAchieng / azure-networking-management

0 stars 0 forks source link

Exception Handling for Cleanup #5

Closed EmAchieng closed 1 week ago

EmAchieng commented 2 weeks ago

Description: The finally block attempts to delete resources regardless of whether they were successfully created. This can lead to redundant or failed delete operations and unnecessary errors if the resources do not exist.

Possible Fix: Add checks to ensure resources were created successfully before attempting to delete them. Alternatively, implement a more robust cleanup strategy that verifies the existence and status of resources before attempting to remove them.