Skip to content

Commit

Permalink
Improve logging of errors in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Sep 19, 2024
1 parent 2e5aa92 commit 27c4530
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ert/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ async def _write_responses_to_storage(
)
except ValueError as err:
errors.append(str(err))
logger.warning(f"Failed to write: {run_arg.iens}", exc_info=err)
if errors:
return LoadResult(LoadStatus.LOAD_FAILURE, "\n".join(errors))
return LoadResult(LoadStatus.LOAD_SUCCESSFUL, "")
Expand All @@ -97,7 +98,7 @@ async def forward_model_ok(
)

except Exception as err:
logging.exception(f"Failed to load results for realization {run_arg.iens}")
logger.exception(f"Failed to load results for realization {run_arg.iens}")
parameters_result = LoadResult(
LoadStatus.LOAD_FAILURE,
"Failed to load results for realization "
Expand Down

0 comments on commit 27c4530

Please sign in to comment.