Commit 2d0bfb6 1 parent c031ffd commit 2d0bfb6 Copy full SHA for 2d0bfb6
File tree 1 file changed +22
-8
lines changed
frontend/src/pages/destructionlist/review
1 file changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -180,10 +180,17 @@ export async function destructionListApproveListAction({
180
180
listFeedback : comment ,
181
181
} ;
182
182
183
- await Promise . all ( [
184
- await createDestructionListReview ( data ) ,
185
- await clearZaakSelection ( getDestructionListReviewKey ( destructionList ) ) ,
186
- ] ) ;
183
+ try {
184
+ await Promise . all ( [
185
+ await createDestructionListReview ( data ) ,
186
+ await clearZaakSelection ( getDestructionListReviewKey ( destructionList ) ) ,
187
+ ] ) ;
188
+ } catch ( e : unknown ) {
189
+ if ( e instanceof Response ) {
190
+ return await ( e as Response ) . json ( ) ;
191
+ }
192
+ throw e ;
193
+ }
187
194
return redirect ( "/" ) ;
188
195
}
189
196
@@ -206,9 +213,16 @@ export async function destructionListRejectListAction({
206
213
zakenReviews : zaakReviews ,
207
214
} ;
208
215
209
- await Promise . all ( [
210
- createDestructionListReview ( data ) ,
211
- clearZaakSelection ( getDestructionListReviewKey ( destructionList ) ) ,
212
- ] ) ;
216
+ try {
217
+ await Promise . all ( [
218
+ createDestructionListReview ( data ) ,
219
+ clearZaakSelection ( getDestructionListReviewKey ( destructionList ) ) ,
220
+ ] ) ;
221
+ } catch ( e : unknown ) {
222
+ if ( e instanceof Response ) {
223
+ return await ( e as Response ) . json ( ) ;
224
+ }
225
+ throw e ;
226
+ }
213
227
return redirect ( "/" ) ;
214
228
}
You can’t perform that action at this time.
0 commit comments