Skip to content

Commit fb1226f

Browse files
Add last_response_header for rate limit debugging
1 parent 475c67f commit fb1226f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdk/diffgram/core/core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
class Project():
2222
default_directory: Directory
23+
last_response_header: None
2324

2425
def __init__(
2526
self,
@@ -225,6 +226,9 @@ def handle_errors(self,
225226
after this, and that fails in poor way if there is no json available.
226227
"""
227228

229+
if response.headers:
230+
self.last_response_header = response.headers
231+
228232
# Default
229233
if response.status_code == 200:
230234
return

0 commit comments

Comments
 (0)