I often see that writing to the HttpContext.Response.Body stream is a bad practice (or using PushStreamContent or StreamContent as part of a HttpMessageResponse) cause then you cannot change the HTTP status code if there is something wrong happening.
Is there any workaround to actually perform async writing to the output stream while being able to change HTTP status code in case the operation goes wrong?