-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
There is no 204 status code support in api_client.py, which will cause issue when status code is 204 like set_assignee api etc.
Current Code
async def send(self, request: Request, type_: Type[T]) -> T:
response = await self.middleware(request, self.send_inner)
if response.status_code in [200, 201]:
try:
return parse_obj_as(type_, response.json())
except ValidationError as e:
raise ResponseHandlingException(e)
raise UnexpectedResponse.for_response(response)Issue:
Exception raised when 204 returned.
Unexpected Response: 204 (Unrecognized Status Code)
Current resolution:
We manually added 204 support as below to avoid exception.
if response.status_code == 204:
return responseMetadata
Metadata
Assignees
Labels
No labels