Skip to content

Commit 7ba0e1c

Browse files
luckdev2350Hao Cen
and
Hao Cen
committed
fix(errors): properly assign APIError.body (#949)
Co-authored-by: Hao Cen <[email protected]>
1 parent 86a59a2 commit 7ba0e1c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/openai/_exceptions.py

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def __init__(self, message: str, request: httpx.Request, *, body: object | None)
4848
super().__init__(message)
4949
self.request = request
5050
self.message = message
51+
self.body = body
5152

5253
if is_dict(body):
5354
self.code = cast(Any, body.get("code"))

0 commit comments

Comments
 (0)