Closed 1dimir closed 1 year ago
Thanks for raising this! Unfortunately this is an auto-generated repo so we can't accept pull requests. I've applied a very similar fix to the (private) template repo and this should be fixed in https://github.com/gocardless/gocardless-pro-python/releases/tag/v1.46.1
According to documentation (https://developer.gocardless.com/api-reference#customers-remove-a-customer)
HTTP 204 No Content
- is a valid answer, that contains no payload.api_client.py::_handle_errors()
expects a jsonable body in response in any case. That goes wrong in case ofHTTP DELETE
.These changes introduce an exception for
HTTP 204
specifically.Added two tests for both possible answers to deletion request:
HTTP 204 No Content
andHTTP 410 Gone
.tox.ini
updated in order to rapidly validate a single test - arguments are passed topytest
.