I generate a set of letters in a file, but if there are errors then the file may be incomplete. I want to send the file anyway, but with a warning to the user. So I have this:
I would suggest to have a page which would instruct the users the file download will begin shortly and in this page, you can display any warnings.
This page would make a separate request for the file, using JS / meta refresh and continue the download. You may also want to provide a direct link, if the download doesn't begin in specified time.
You can't return HTML and another response (for file's stream) in single GET.
You can return HTML and have link to download file there.