You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preview branch cleanup previously required the Console. branch remove
takes an explicit branch id or git name in the resolved project, the
exact-id --confirm convention, and maps the platform's guarantees to
structured codes: BRANCH_PROTECTED for production/default branches
(422) and BRANCH_NOT_EMPTY when live apps or databases remain (409),
so removal never cascades into member resources. Removal is a platform
soft-delete and never touches local Git branches.
Branch creation deliberately stays implicit (git-push automation and
app deploy); there is no branch create, per team alignment.
- remove a preview Branch from the resolved project
794
+
795
+
Behavior:
796
+
797
+
- requires auth and resolved project context; accepts `--project <id-or-name>` as an explicit fallback
798
+
- resolves `<branch>` by exact Branch id or exact git name within the resolved project
799
+
- requires `--confirm <branch-id>` where the value exactly matches the resolved Branch id; `--yes` does not satisfy this confirmation
800
+
- production Branches and the project's default Branch are protected: removal fails with `BRANCH_PROTECTED`
801
+
- a Branch that still has live Apps or databases fails with `BRANCH_NOT_EMPTY`; branch removal never deletes member resources, so remove the Branch's apps and databases first
802
+
- removal is a platform soft-delete: the Branch disappears from `branch list`, and the platform owns retention of soft-deleted Branches
803
+
- Branch creation stays implicit (git-push automation and `app deploy`); there is deliberately no `branch create`
804
+
- never touches local Git branches
805
+
- fails with `BRANCH_NOT_FOUND` when no Branch matches
Copy file name to clipboardExpand all lines: docs/product/error-conventions.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,6 +175,9 @@ These codes are the minimum stable set for the MVP:
175
175
-`LOCAL_STATE_WRITE_FAILED`
176
176
-`LOCAL_STATE_STALE`
177
177
-`BRANCH_NOT_DEPLOYABLE`
178
+
-`BRANCH_NOT_FOUND`
179
+
-`BRANCH_PROTECTED`
180
+
-`BRANCH_NOT_EMPTY`
178
181
-`COMPUTE_CONFIG_INVALID`
179
182
-`COMPUTE_CONFIG_TARGET_REQUIRED`
180
183
-`COMPUTE_CONFIG_TARGET_UNKNOWN`
@@ -237,6 +240,9 @@ Recommended meanings:
237
240
-`LOCAL_STATE_WRITE_FAILED`: the CLI could not save local Project binding state such as `.prisma/local.json` or the matching `.gitignore` entry; callers should fix directory permissions or filesystem state before retrying
238
241
-`LOCAL_STATE_STALE`: local Project pin no longer matches platform data and continuing would be ambiguous
239
242
-`BRANCH_NOT_DEPLOYABLE`: command tried to deploy to a non-deployable branch context
243
+
-`BRANCH_NOT_FOUND`: requested branch id or git name does not exist in the resolved project
244
+
-`BRANCH_PROTECTED`: branch removal refused because the branch is the project's production or default branch
245
+
-`BRANCH_NOT_EMPTY`: branch removal refused because the branch still has live apps or databases
240
246
-`COMPUTE_CONFIG_INVALID`: `prisma.compute.ts` failed to load or validate
241
247
-`COMPUTE_CONFIG_TARGET_REQUIRED`: a multi-app compute config needs an `[app]` target and none was given or inferred
242
248
-`COMPUTE_CONFIG_TARGET_UNKNOWN`: the `[app]` target matches no configured app
0 commit comments