Skip to content

Commit c70e194

Browse files
cenhaoHao Cen
and
Hao Cen
authored
fix(errors): properly assign APIError.body (#949)
Co-authored-by: Hao Cen <[email protected]>
1 parent 54f0ce0 commit c70e194

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)