The get_history() function lets you access the job history information where you can find a job record for each job execution, including execution errors.
get_history()
Use the get_history() method to get history of job execution:
my_job.get_history()