Skip to content

Commit 65b08eb

Browse files
committed
@GitHK review
1 parent 1c4988b commit 65b08eb

File tree

1 file changed

+8
-8
lines changed
  • services/director-v2/src/simcore_service_director_v2/api/routes

1 file changed

+8
-8
lines changed

services/director-v2/src/simcore_service_director_v2/api/routes/computations.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ async def _try_start_pipeline(
257257
# NOTE: in case of a burst of calls to that endpoint, we might end up in a weird state.
258258
@run_sequentially_in_context(target_args=["computation.project_id"])
259259
# NOTE: This endpoint is historically used for CREATE, UPDATE or START a computation!
260-
async def create_or_update_or_start_computation( # noqa: PLR0913, C901 # pylint: disable=too-many-positional-arguments
260+
async def create_or_update_or_start_computation( # noqa: PLR0913 # pylint: disable=too-many-positional-arguments
261261
computation: ComputationCreate,
262262
request: Request,
263263
response: Response,
@@ -369,14 +369,14 @@ async def create_or_update_or_start_computation( # noqa: PLR0913, C901 # pylint
369369
submitted=last_run.created if last_run else None,
370370
)
371371

372-
except ProjectNotFoundError as e:
373-
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"{e}") from e
374-
except ClusterNotFoundError as e:
375-
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"{e}") from e
376-
except PricingPlanUnitNotFoundError as e:
377-
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"{e}") from e
378-
except EC2InstanceTypeNotFoundError as e:
372+
except (
373+
ProjectNotFoundError,
374+
ClusterNotFoundError,
375+
PricingPlanUnitNotFoundError,
376+
EC2InstanceTypeNotFoundError,
377+
) as e:
379378
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"{e}") from e
379+
380380
except ClustersKeeperNotAvailableError as e:
381381
raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail=f"{e}") from e
382382
except ConfigurationError as e:

0 commit comments

Comments
 (0)