how to make publishing fail if any hyperlink issue is there in document

Hi,

I am working on a post process plugin in Tridion docs, I have requirement to make the document publishing fail if any hyperlinks are not resolved. Current behavior of Tridion doc is whenever a link is not resolved document will get a draft status instead of Released candidate state.

What is the best approach to make this done?

Regards

Roopesh