Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

better error logs

Daniel Hougaard9aabc3ced7a5
diff --git a/backend/src/services/microsoft-teams/microsoft-teams-fns.ts b/backend/src/services/microsoft-teams/microsoft-teams-fns.ts
index 075151c854..3a3b5ff33b 100644
--- a/backend/src/services/microsoft-teams/microsoft-teams-fns.ts
+++ b/backend/src/services/microsoft-teams/microsoft-teams-fns.ts
@@ -547,10 +547,17 @@ export class TeamsBot extends TeamsActivityHandler {
}
);
} catch (error) {
- logger.error(
- error,
- `sendMessageToChannel: Microsoft Teams Workflow Integration: Failed to send message to channel [channelId=${channelId}] [teamId=${teamId}] [tenantId=${tenantId}]`
- );
+ if (axios.isAxiosError(error)) {
+ logger.error(
+ error.response?.data,
+ `sendMessageToChannel: Axios Error, Microsoft Teams Workflow Integration: Failed to send message to channel [channelId=${channelId}] [teamId=${teamId}] [tenantId=${tenantId}]`
+ );
+ } else {
+ logger.error(
+ error,
+ `sendMessageToChannel: Microsoft Teams Workflow Integration: Failed to send message to channel [channelId=${channelId}] [teamId=${teamId}] [tenantId=${tenantId}]`
+ );
+ }
throw error;
}
}