darrenhillconsulting
12/10/2023, 8:41 PMthrow
an exception in the MAP stage of a Map/Reduce ... and have that exception show up in the SUMMARY stage in the context.mapSummary.errors . It should no?erictgrubaugh
12/10/2023, 9:01 PMdarrenhillconsulting
12/10/2023, 9:08 PMlet mapErrorCount = 0;
context.mapSummary.errors.iterator().each((key, error, executionNo) => {
mapErrorCount++;
log.error('summarize - mapSummary.errors', { key, error, executionNo });
return true;
});
erictgrubaugh
12/10/2023, 9:13 PMdefine([], function () {
function getInputData() {
return {type:'suiteql', query: 'SELECT * FROM customrecord_sma_config'}
}
function map (context) {
throw { name: 'an-error', message: 'a message' }
}
function summarize (context) {
context.mapSummary.errors.iterator().each((key, error, executionNo) => {
log.error('key=', key)
log.error('error=', error)
log.error('executionNo', executionNo)
log.error('summarize - mapSummary.errors', { key, error, executionNo })
return true
})
}
return { getInputData, map, summarize }
})
erictgrubaugh
12/10/2023, 9:14 PMerictgrubaugh
12/10/2023, 9:15 PMthrow
is not actually escaping the map
? Getting caught instead? Guessing at this pointdarrenhillconsulting
12/12/2023, 1:14 AM