    @Test
    public void testIgnoreErrors() throws Exception {

        MockContext ctx = new MockContext(buildDbQueryConfig());

        // Set ignoreErrors = true
        UtilsTest.injectVariable(task, "action", "bad_action");
        UtilsTest.injectVariable(task, "ignoreErrors", true);

        // Normally, this should throw an exception
        task.execute(ctx);

        // Make sure it failed gracefully and has an error message
        Map result = (Map) ctx.getVariable("result");
        assertNotNull(result);
        assertFalse((Boolean)result.get("ok"));
        String error = (String) result.get("error");
        assertTrue(error.contains("Not a supported action"));
    }