Replace ControllerForbiddenError with aiohttp.web.HTTPForbidden for project deletion error handling

This commit is contained in:
grossmj 2026-07-12 11:05:15 +02:00
parent 40644f33e6
commit 0ecaab4da0
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -910,7 +910,7 @@ class Project:
disconnected = self._get_disconnected_computes()
if disconnected:
compute_names = ", ".join([f"'{c.name}'" for c in disconnected])
raise ControllerForbiddenError(
raise aiohttp.web.HTTPForbidden(
f"Cannot delete project '{self.name}': {len(disconnected)} compute(s) are disconnected: {compute_names}. "
f"Please fix the connection or delete the project manually on those computes."
)