Skip to content

Commit

Permalink
Fix help message on CallbackError reporting batch handler (#1204)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Jan 30, 2025
1 parent 870e605 commit c0b15dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Releases prior to 7.0 has been removed from this file to declutter search result

### Fixed

- cli: Fixed help message on `CallbackError` reporting `batch` handler instead of actual one.
- substrate.subsquid: Fixed parsing nested structures in response.

### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/dipdup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ def _print() -> None:
tb = traceback.extract_tb(error.__traceback__)
for frame in tb:
if frame.name == 'fire_handler':
module = next(f.filename for f in tb if '/handlers/' in f.filename or '/hooks/' in f.filename)
echo(CallbackError(module=Path(module).stem, exc=error).help(), err=True)
modules = tuple(f.filename for f in tb if '/handlers/' in f.filename or '/hooks/' in f.filename)
echo(CallbackError(module=Path(modules[-1]).stem, exc=error).help(), err=True)
break
else:
echo(Error.default_help(), err=True)
Expand Down

0 comments on commit c0b15dc

Please sign in to comment.