File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -111,20 +111,27 @@ async function sendSurveys () {
111
111
await sendSurveyAPI ( collector . collectorId , collector . messageId )
112
112
} catch ( e ) {
113
113
for ( const contactId in contactIdToWorkPeriodIdMap [ collectorName ] ) {
114
- await partiallyUpdateWorkPeriod ( currentUser , contactIdToWorkPeriodIdMap [ collectorName ] [ contactId ] , { sentSurveyError : e } )
114
+ try {
115
+ await partiallyUpdateWorkPeriod ( currentUser , contactIdToWorkPeriodIdMap [ collectorName ] [ contactId ] , { sentSurveyError : e } )
116
+ } catch ( e ) {
117
+ logger . error ( { component : 'SurveyService' , context : 'sendSurvey' , message : 'Error : ' + e . message } )
118
+ }
115
119
}
116
120
continue
117
121
}
118
122
for ( const contactId in contactIdToWorkPeriodIdMap [ collectorName ] ) {
119
- await partiallyUpdateWorkPeriod ( currentUser , contactIdToWorkPeriodIdMap [ collectorName ] [ contactId ] , { sentSurvey : true } )
123
+ try {
124
+ await partiallyUpdateWorkPeriod ( currentUser , contactIdToWorkPeriodIdMap [ collectorName ] [ contactId ] , { sentSurvey : true } )
125
+ } catch ( e ) {
126
+ logger . error ( { component : 'SurveyService' , context : 'sendSurvey' , message : 'Error : ' + e . message } )
127
+ }
120
128
}
121
129
}
122
130
}
123
131
124
132
logger . info ( { component : 'SurveyService' , context : 'sendSurvey' , message : 'send survey successfullly' } )
125
133
} catch ( e ) {
126
134
logger . error ( { component : 'SurveyService' , context : 'sendSurvey' , message : 'Error : ' + e . message } )
127
- throw e
128
135
}
129
136
}
130
137
You can’t perform that action at this time.
0 commit comments