# RESOURCE_NOT_EMPTY

- Surface: API
- HTTP status: 409
- Details: `{ resourceType: "app" | "environment" | "flag" | "variant" | "organization", resourceId: string, childType: string, childCount: number, attemptedOp: string, blockers?: Array<{ resourceType, resourceId, childType, children: Array<{ id, removeCommand }> }> }`

## Cause

A destructive delete was refused because child resources still exist under the target and this delete does not cascade.

## Fix

`details.blockers` lists every current child by ID and the CLI command that removes it (`removeCommand`, CLI vocabulary). `childType` summarizes the first group; `childCount` is the total child count across all blocker groups. Remove the children via those commands, then delete the parent. For App deletes only, `apps delete --force` can cascade non-gated children (and stop on pending Approvals). The refusal is deliberate: a silent cascade would take down more than the call named.

## Related

- [EXPERIMENT_RUNNING](https://splitch.dev/docs/error/EXPERIMENT_RUNNING)
- [LAST_ENVIRONMENT_REQUIRED](https://splitch.dev/docs/error/LAST_ENVIRONMENT_REQUIRED)

Source: https://splitch.dev/docs/error/RESOURCE_NOT_EMPTY