Handle error in inserting content