error handle the post operation