corrected error handling for missing repo or job