corrected osm_errors sql query