We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c6d9c0 commit e5d1da0Copy full SHA for e5d1da0
packages/cli/src/commands/sandbox/sandbox-devtools/sandbox_devtools_command.ts
@@ -367,9 +367,14 @@ export class SandboxDevToolsCommand implements CommandModule<object> {
367
try {
368
const cfnClient = this.awsClientProvider.getCloudFormationClient();
369
const stackName = BackendIdentifierConversions.toStackName(backendId);
370
- await cfnClient.send(
+ const response = await cfnClient.send(
371
new DescribeStacksCommand({ StackName: stackName }),
372
);
373
+
374
+ if (!response || !response.Stacks || response.Stacks.length === 0) {
375
+ return 'nonexistent';
376
+ }
377
378
return 'stopped'; // Stack exists, default to stopped
379
} catch (error) {
380
if (String(error).includes('does not exist')) {
0 commit comments