Redo controller logic nesting to be more defensive

Handle the case where a publish_as call fails so we show something to
the user.