It is not clear why `query` throws an exception in case of error, but `command` not, so the user has to manually check the return code.