Error handling of post