The getHistory()
function lets you access the job history information where you can find a job record for each job execution, including execution errors.
Syntax and Example
Server server = MindsDB.connect();
Job improveJob = server.getJob("improve_model");
Table jobHistory = improveJob.getHistory();