more robust handling of job endpoint