refactor(API): surface error from mapUnitToJob