开发者

When an RSS feed generator encounters an error, what should it return?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜