amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
939 stars 232 forks source link

Fix domain deleting when fail on not exist stack #627

Closed 0vvland closed 4 months ago

0vvland commented 7 months ago

Fixes #0000

Description of Issue Fixed When stack not exists findApiId() fails on getStack() and then on getNestedStack(). Try block in removeBasePathMappings() do not set externalBasePathExists flag. As result domain that has other mappings are removed.

Changes proposed in this pull request: This fix adds extra check to catch block of removeBasePathMappings() if option preserveExternalPathMappings is set in stack config (by setting this option user identify that domain should have another mappings) and set the flag externalBasePathExists that prevent removing domain.

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud