added eror handler for empty post