Skip to content

Commit

Permalink
Merge pull request #85 from Incorta/better-logging
Browse files Browse the repository at this point in the history
Add error stacktrace to Network retry
  • Loading branch information
HaniaMoHani authored Jan 14, 2025
2 parents 12cb9f8 + 179313e commit bdf73eb
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 bdf73eb

Please # to comment.