Skip to content

Commit

Permalink
Catchall in scripts catch base exception for rust errors (#1694)
Browse files Browse the repository at this point in the history
  • Loading branch information
slundqui authored Sep 25, 2024
1 parent 0e8dd72 commit f3b5e9d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/checkpoint_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def parse_arguments(argv: Sequence[str] | None = None) -> Args:
# Wrap everything in a try catch to log any non-caught critical errors and log to rollbar
try:
asyncio.run(main())
except Exception as exc: # pylint: disable=broad-except
except BaseException as exc: # pylint: disable=broad-except
# pylint: disable=invalid-name
_rpc_uri = os.getenv("RPC_URI", None)
if _rpc_uri is None:
Expand Down
2 changes: 1 addition & 1 deletion scripts/invariant_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def parse_arguments(argv: Sequence[str] | None = None) -> Args:
# Wrap everything in a try catch to log any non-caught critical errors and log to rollbar
try:
asyncio.run(main())
except Exception as e: # pylint: disable=broad-except
except BaseException as e: # pylint: disable=broad-except
# pylint: disable=invalid-name
_rpc_uri = os.getenv("RPC_URI", None)
if _rpc_uri is None:
Expand Down
2 changes: 1 addition & 1 deletion src/agent0/hyperlogs/rollbar_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def log_rollbar_message(message: str, log_level: int, extra_data: dict | None =


def log_rollbar_exception(
exception: Exception, log_level: int, extra_data: dict | None = None, rollbar_log_prefix: str | None = None
exception: BaseException, log_level: int, extra_data: dict | None = None, rollbar_log_prefix: str | None = None
):
"""Logs an exception to the rollbar service.
Expand Down

0 comments on commit f3b5e9d

Please sign in to comment.