Skip to content

Commit

Permalink
Fixed deleting participants from group
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-paul committed Jul 5, 2023
1 parent 58fc94b commit 2a0dba3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _base_request(
response = requests.patch(url, headers=headers, json=params)

elif method == HTTPMethod.DELETE:
response = requests.delete(url, headers=headers)
response = requests.delete(url, headers=headers, json=params)
else:
raise ProlificException('Invalid HTTP method.')

Expand All @@ -96,7 +96,9 @@ def _base_request(
return result

except requests.exceptions.HTTPError as err:
logger.error(f'{log_prefix} Request error: {str(err)}')
logger.error(
f'{log_prefix} Request error: {err}. Response text: `{err.response.text}`'
)
if err.response.status_code == status.HTTP_401_UNAUTHORIZED:
raise ProlificAuthenticationError

Expand Down

0 comments on commit 2a0dba3

Please sign in to comment.