mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-26 13:50:25 +03:00
Replace ControllerForbiddenError with aiohttp.web.HTTPForbidden for project deletion error handling
This commit is contained in:
parent
40644f33e6
commit
0ecaab4da0
@ -910,7 +910,7 @@ class Project:
|
|||||||
disconnected = self._get_disconnected_computes()
|
disconnected = self._get_disconnected_computes()
|
||||||
if disconnected:
|
if disconnected:
|
||||||
compute_names = ", ".join([f"'{c.name}'" for c in 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"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."
|
f"Please fix the connection or delete the project manually on those computes."
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user