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
873
+
874
+
Behavior:
875
+
876
+
- requires auth and resolved project context; accepts `--project <id-or-name>` as an explicit fallback
877
+
- resolves `<branch>` by exact Branch id or exact git name within the resolved project
878
+
- requires `--confirm <branch-id>` where the value exactly matches the resolved Branch id; `--yes` does not satisfy this confirmation
879
+
- production Branches and the project's default Branch are protected: removal fails with `BRANCH_PROTECTED`
880
+
- 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
881
+
- removal is a platform soft-delete: the Branch disappears from `branch list`, and the platform owns retention of soft-deleted Branches
882
+
- Branch creation stays implicit (git-push automation and `app deploy`); there is deliberately no `branch create`
883
+
- never touches local Git branches
884
+
- 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
@@ -181,6 +181,9 @@ These codes are the minimum stable set for the MVP:
181
181
-`LOCAL_STATE_WRITE_FAILED`
182
182
-`LOCAL_STATE_STALE`
183
183
-`BRANCH_NOT_DEPLOYABLE`
184
+
-`BRANCH_NOT_FOUND`
185
+
-`BRANCH_PROTECTED`
186
+
-`BRANCH_NOT_EMPTY`
184
187
-`COMPUTE_CONFIG_INVALID`
185
188
-`COMPUTE_CONFIG_TARGET_REQUIRED`
186
189
-`COMPUTE_CONFIG_TARGET_UNKNOWN`
@@ -252,6 +255,9 @@ Recommended meanings:
252
255
-`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
253
256
-`LOCAL_STATE_STALE`: local Project pin no longer matches platform data and continuing would be ambiguous
254
257
-`BRANCH_NOT_DEPLOYABLE`: command tried to deploy to a non-deployable branch context
258
+
-`BRANCH_NOT_FOUND`: requested branch id or git name does not exist in the resolved project
259
+
-`BRANCH_PROTECTED`: branch removal refused because the branch is the project's production or default branch
260
+
-`BRANCH_NOT_EMPTY`: branch removal refused because the branch still has live apps or databases
255
261
-`COMPUTE_CONFIG_INVALID`: `prisma.compute.ts` failed to load or validate
256
262
-`COMPUTE_CONFIG_TARGET_REQUIRED`: a multi-app compute config needs an `[app]` target and none was given or inferred
257
263
-`COMPUTE_CONFIG_TARGET_UNKNOWN`: the `[app]` target matches no configured app
0 commit comments