HTTP error content is empty (unexpected per documentation)

I’m trying to get a json response from a 409 error code. When using anvil.http.request I get the 409 status (just as I am expecting) but the content is empty. Per the documentation it should not be empty: Anvil Docs | Making HTTP requests
(this problem is happening client side)

My backend is django, I’m sending back a JsonResponse with data.

Here’s the code being called from python’s requests library. We can decode the json and get the dictionary:

 In [17]: r = requests.post(url="http://127.0.0.1:8000/api/v1/cdets/", json={'tcr': 1245, 'cdets_id': 'CSCwc18830', 'category': 'knownsw'})

 In [18]: r.status_code
Out[18]: 409

 In [19]: r.json()
Out[19]: {'id': 6}

Here’s the code being called by anvil.http.request with some prints. I am not able to get the dictionary with the information that I’m expecting:

   try:
     response = anvil.http.request(url="http://127.0.0.1:8000" + "/api/v1/cdets/", json=True, method="POST", data={'tcr': 1245, 'cdets_id': 'CSCwc18830', 'category': 'knownsw'},)
   except anvil.http.HttpError as e:
     print(f"Error {e.status}")
     print(f"Content {e.content}")

# Results in the following messages:
[DEBUG anvil.app-server.run] [CLIENT] Error 409
Content None

We see that the Content is None, where I expected to get the dictionary like when I use python’s request. Am I doing something wrong or is this a bug?

Sounds like a bug to me. Moved to bug reports and will update.