catch error of post