Skip to content

Commit

Permalink
feat: added log for rocket.chat errors
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mi committed Jan 17, 2024
1 parent fca11eb commit ca5d6c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Tools/src/tools/user/ReassignRCRoomsToUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ class ReassignRCRoomsToUser extends AbstractTool {
counts.feedback[fRes]++;
}
} catch (e) {
if (e instanceof AxiosError) {
await logger.error(`Rocket.chat error for consultant "${consultant.rc_user_id}".`, JSON.stringify(e.response?.data || "{}"));
}
// Remove technical user from room
await rocketChatService.post('groups.leave', { roomId: agencySession.rc_group_id });
throw e;
Expand Down

0 comments on commit ca5d6c7

Please sign in to comment.