Skip to content

Commit

Permalink
fix(magentic-one): Remove redundant exception raising in update_ledger (
Browse files Browse the repository at this point in the history
#4759)

* fix(magentic-one): Remove redundant exception raising in update_ledger method

* Remove unused exception variable 'e'

---------

Co-authored-by: Roy Belio <[email protected]>
Co-authored-by: Hussein Mozannar <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent 453fe0c commit 3dd4be9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,13 @@ async def update_ledger(self, cancellation_token: Optional[CancellationToken] =
if key_error:
continue
return ledger_dict
except json.JSONDecodeError as e:
except json.JSONDecodeError:
self.logger.info(
OrchestrationEvent(
f"{self.metadata['type']} (error)",
f"Failed to parse ledger information: {ledger_str}",
)
)
raise e

raise ValueError("Failed to parse ledger information after multiple retries.")

Expand Down

0 comments on commit 3dd4be9

Please sign in to comment.