diff --git a/front/lib/api/assistant/pubsub.ts b/front/lib/api/assistant/pubsub.ts index 36f828b9e7bd..1f71fdf5aa32 100644 --- a/front/lib/api/assistant/pubsub.ts +++ b/front/lib/api/assistant/pubsub.ts @@ -248,7 +248,17 @@ async function handleUserMessageEvents( ); } } catch (e) { - logger.error({ error: e }, "Error Posting message"); + logger.error( + { + error: e, + conversationId: conversation.sId, + workspaceId: conversation.owner.sId, + type: "handl_user_message_events", + userMessageId: userMessage?.sId, + agentMessageIds: agentMessages.map((m) => m.sId), + }, + "Error Posting message" + ); } finally { await redis.quit(); if (!didResolve) { @@ -344,7 +354,16 @@ export async function retryAgentMessageWithPubSub( } } } catch (e) { - logger.error({ error: e }, "Error Posting message"); + logger.error( + { + error: e, + conversationId: conversation.sId, + workspaceId: conversation.owner.sId, + type: "retry_agent_message", + agentMessageId: message.sId, + }, + "Error Posting message" + ); } finally { await redis.quit(); if (!didResolve) { diff --git a/front/next.config.js b/front/next.config.js index 8b63067d42da..f23a0a14582c 100644 --- a/front/next.config.js +++ b/front/next.config.js @@ -67,7 +67,7 @@ module.exports = { config.module.rules.push({ test: /\.js$/, use: ["source-map-loader"], - enforce: "pre" + enforce: "pre", }); return config; },