diff --git a/src/resubmitter/resubmitter.ts b/src/resubmitter/resubmitter.ts index 5339243..94e5424 100644 --- a/src/resubmitter/resubmitter.ts +++ b/src/resubmitter/resubmitter.ts @@ -65,8 +65,10 @@ const iteration = (context: IterationContext): Promise => { return message.del(); }) .catch((err) => { - message.changeVisibility(context.releaseTimeoutSeconds); - return Promise.reject(err); + return message.changeVisibility(context.releaseTimeoutSeconds) + .then(() => { + return Promise.reject(err); + }); }); }); });