Skip to content

Commit 4e09f36

Browse files
fix: Log 422 response body for debugging
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
1 parent 1b3e6a9 commit 4e09f36

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/cvec/cvec.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,15 @@ def _make_request(
140140
# If refresh fails, continue with the original error
141141
pass
142142

143-
response.raise_for_status()
143+
try:
144+
response.raise_for_status()
145+
except requests.exceptions.HTTPError as e:
146+
if e.response.status_code == 422:
147+
print(
148+
"Received 422 Unprocessable Entity. Response body: "
149+
f"{e.response.text}"
150+
)
151+
raise
144152

145153
if (
146154
response.headers.get("content-type")

0 commit comments

Comments
 (0)