Add error handler from getConnection to query
allow order term to be single-length array