added sql to error