Skip to content

Commit

Permalink
Merge branch 'main' into ol-ALEPH-298-too-many-open-files
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh authored Nov 6, 2024
2 parents 6e989ec + 662c0c0 commit fa3a05a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aleph/vm/orchestrator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ async def run_code_on_request(vm_hash: ItemHash, path: str, pool: VmPool, reques

# The Diagnostics VM checks for the proper handling of exceptions.
# This fills the logs with noisy stack traces, so we ignore this specific error.
ignored_error = 'raise CustomError("Whoops")'
ignored_errors = ['raise CustomError("Whoops")', "main.CustomError: Whoops"]

if settings.IGNORE_TRACEBACK_FROM_DIAGNOSTICS and ignored_error in result["traceback"]:
if settings.IGNORE_TRACEBACK_FROM_DIAGNOSTICS and any(
ignored_error in result["traceback"] for ignored_error in ignored_errors
):
logger.debug('Ignored traceback from CustomError("Whoops")')
else:
logger.warning(result["traceback"])
Expand Down

0 comments on commit fa3a05a

Please sign in to comment.