Commit 2683af0
``DeploymentSessionDraftBuilder.build`` and ``_resolve_mounts`` were
raising bare ``ValueError`` when ``model_mount_config.vfolder_id`` is
``None`` — a real reachable state, since ``deployment_revisions.model``
is a SET NULL FK that collapses to NULL when the backing vfolder row is
deleted. Per the project rule, business-logic exceptions must inherit
from ``BackendAIError``.
Add ``RevisionMissingModelVFolder(BackendAIError, web.HTTPBadRequest)``
to ``manager/errors/deployment.py`` and switch both raise sites in
``deployment_draft_builder.py`` to use it. Other call sites that detect
the same condition (``SessionValidationSpec.from_revision_spec`` /
``from_revision``, ``service._build_creator_from_revision_data``)
already raise ``InvalidAPIParameters`` so they stay
``BackendAIError``-based and unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e1cfed7 commit 2683af0
2 files changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
69 | 92 | | |
70 | 93 | | |
71 | 94 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | | - | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
0 commit comments