Return an error in publish