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 fd3eb2b commit fca11eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/src/tools/user/ReassignRCRoomsToUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import AbstractTool, {Methods, PugTemplate} from "../AbstractTool.js";
import {mysqlFn} from "../../index.js";
import rocketChatService from "../../helper/rocketChatService.js";
import ToolsError from "../../helper/ToolsError.js";
import {AxiosError} from "axios";
import { AxiosError } from "axios";
import logger from "../../helper/logger.js";

type Counts = {
Expand Down Expand Up @@ -101,6 +101,7 @@ class ReassignRCRoomsToUser extends AbstractTool {
await logger.error(`Room "${roomId}" of consultant "${consultant.rc_user_id}" not found in rocket.chat.`);
return 'skipped' as T;
}
await logger.error(`Error assigning technical user to "${roomId}" of consultant "${consultant.rc_user_id}".`, JSON.stringify(e.response?.data || "{}"));
}
throw e;
}
Expand Down

0 comments on commit fca11eb

Please sign in to comment.