updated error message for sql errors