File size: 513 Bytes
e82ccf1
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
{
  "title": "Handle retry exhaustion",
  "body": "Return the last error after all attempts are exhausted.",
  "branch": "feature/retry-exhaustion",
  "commit_messages": [
    "Handle retry exhaustion"
  ],
  "diff": "diff --git a/retry.py b/retry.py\n--- a/retry.py\n+++ b/retry.py\n@@ -8,4 +8,7 @@ def run(operation):\n+    last_error = None\n     for _ in range(3):\n         try:\n             return operation()\n+        except Exception as error:\n+            last_error = error\n+    raise last_error"
}