returns error if post failed