I storied query errors in my database class and created a public error variable