@@ -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