If there is an error in the SQL, queryDB returns -1 (no error is raised), and if I misspell a variable in $_SERVER or it doesn't exist, I get a null value. I don't think there would be a 500 error in any of the cases.