当RSS源生成器遇到错误时,它应该返回什么?

I have a PHP script that generates an RSS feed using some external data it retrieves. However, due to the nature of this data, there may be times when it cannot be retrieved or when it receives corrupted data.

What should the PHP script return to the client? Should it return an HTML document with the error message, or should it return a feed with one item that contains the error message?

How would standard feed readers react to receiving an HTML document instead of a feed?

It should return a HTML page with a HTTP status code in the 500s. The user can look at the raw page if they want to understand what the issue is.