Catch exceptions when the server closes the connection before the content is fully delivered