Skip to content

Commit

Permalink
feat(api): minor try catch change
Browse files Browse the repository at this point in the history
  • Loading branch information
salemsd committed Jan 10, 2025
1 parent cc13286 commit 0e6896f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/antares/craft/service/api_services/study_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
StudySettingsUpdateError,
StudyVariantCreationError,
TaskFailedError,
ThermalTimeseriesGenerationError,
ThermalTimeseriesGenerationError, TaskTimeOutError,
)
from antares.craft.model.binding_constraint import BindingConstraint
from antares.craft.model.output import Output
Expand Down Expand Up @@ -172,5 +172,5 @@ def generate_thermal_timeseries(self) -> None:
response = self._wrapper.put(url)
task_id = response.json()
wait_task_completion(self._base_url, self._wrapper, task_id)
except (APIError, TaskFailedError) as e:
except (APIError, TaskFailedError, TaskTimeOutError) as e:
raise ThermalTimeseriesGenerationError(self.study_id, e.message)
7 changes: 1 addition & 6 deletions tests/integration/test_web_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,9 +626,4 @@ def test_creation_lifecycle(self, antares_web: AntaresWebDesktop):
# delete_outputs
study.delete_outputs()
assert len(study.get_outputs()) == 0
assert len(study.read_outputs()) == 0

# areas = study.get_areas()
# for area_id, area in areas.items():
# for cluster in area.get_thermals().values():
# area._thermal_service.update_thermal_properties(cluster, ThermalClusterProperties(nominal_capacity=1000))
assert len(study.read_outputs()) == 0

0 comments on commit 0e6896f

Please sign in to comment.