Skip to content

Commit

Permalink
Add error stacktrace to Network retry
Browse files Browse the repository at this point in the history
  • Loading branch information
HaniaMoHani committed Jan 13, 2025
1 parent 12cb9f8 commit 179313e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opencopilot/utils/network.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import time
import traceback

from opencopilot.utils import logger


Expand All @@ -15,4 +17,4 @@ def retry(action, retries=3, delay=2):
if i < retries - 1:
time.sleep(delay)

raise Exception(f"Action failed after {retries} attempts, with error: {last_e}")
raise Exception(f"Action failed after {retries} attempts, with error: {last_e}\n {traceback.format_exc()}")

0 comments on commit 179313e

Please # to comment.