Skip to content

Commit

Permalink
Have ErtStorageExceptions not be unexpected in cli
Browse files Browse the repository at this point in the history
This commits makes ErtStorageExceptions not be output as "unexpected error" in cli.
  • Loading branch information
jonathan-eq committed Dec 2, 2024
1 parent 9c0df14 commit 373d5e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ert/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from ert.run_models.multiple_data_assimilation import MultipleDataAssimilation
from ert.services import StorageService, WebvizErt
from ert.shared.storage.command import add_parser_options as ert_api_add_parser_options
from ert.storage import ErtStorageException
from ert.trace import trace, tracer, tracer_provider
from ert.validation import (
IntegerArgument,
Expand Down Expand Up @@ -674,7 +675,7 @@ def main() -> None:
) as context:
logger.info(f"Running ert with {args}")
args.func(args, context.plugin_manager)
except ErtCliError as err:
except (ErtCliError, ErtStorageException) as err:
span.set_status(Status(StatusCode.ERROR))
span.record_exception(err)
logger.debug(str(err))
Expand Down

0 comments on commit 373d5e1

Please sign in to comment.