Skip to content

Commit

Permalink
Resolve service conversation listener on success
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed Sep 27, 2024
1 parent f58ba51 commit c16e9e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions functions/webhooks/serviceConversationListener.protected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export const handler = async (context: Context, event: Event, callback: Serverle
console.debug('New message, checking if we need to send error.');
await sendErrorMessageForUnsupportedMedia(context, event);
} catch (err) {
if (err instanceof Error) resolve(error500(err));
else resolve(error500(new Error(String(err))));
if (err instanceof Error) return resolve(error500(err));
return resolve(error500(new Error(String(err))));
}
resolve(success(event));
}
return resolve(success(event));
};

0 comments on commit c16e9e9

Please sign in to comment.