mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-01 12:10:19 +08:00
fix: handle empty 204 response
This commit is contained in:
@@ -86,6 +86,10 @@ class OasstApiClient:
|
||||
OasstErrorCode.GENERIC_ERROR,
|
||||
HTTPStatus(response.status),
|
||||
)
|
||||
|
||||
if response.status == 204:
|
||||
# No content
|
||||
return None
|
||||
return await response.json()
|
||||
|
||||
def _parse_task(self, data: Optional[dict[str, t.Any]]) -> protocol_schema.Task:
|
||||
|
||||
Reference in New Issue
Block a user