Skip to content

Commit

Permalink
Improve error message for missing response
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Aug 21, 2024
1 parent ccfad8f commit 4301613
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/ert/config/observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ def _handle_general_observation(
state_kw = general_observation.data
if not ensemble_config.hasNodeGenData(state_kw):
ConfigWarning.warn(
f"Ensemble key {state_kw} does not exist"
f" - ignoring observation {obs_key}",
f"No GEN_DATA with name: {state_kw} found - ignoring observation {obs_key}",
state_kw,
)
return {}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/config/test_observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ def test_that_missing_ensemble_key_warns(tmpdir):

with pytest.warns(
ConfigWarning,
match="Ensemble key RES does not exist",
match="No GEN_DATA with name: RES found",
):
ErtConfig.from_file("config.ert")

Expand Down

0 comments on commit 4301613

Please sign in to comment.