fix: handle empty 204 response

This commit is contained in:
Jack Michaud
2023-01-02 21:00:23 -05:00
parent bc796b70ba
commit f66ad30c53
+4
View File
@@ -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: