Handle SELECT errors