Handling errors during async StreamingHttpResponse

In an async view, I return a StreamingHttpResponse that uses an async iterator as streaming_content. The iterator fetches its data from another HTTP service. When the other service fails I throw an Exception inside the iterator, but the response (and the iterator) then “hangs” and the connection will not be closed. What is a good way to handle such errors, especially when using async iterators? As the streaming response has already started, I guess it is also not possible anymore to send a 5xx status back to the client, to let it know that something went wrong. How can I inform the client about the error?