Messaging : better logging (#11621)

Better error logging for messaging import exception handler.

Goal is to have better info on why Unknown errors are thrown and avoid
such messages `Unknown error occurred while importing messages for
message channel XXXXXXXX in workspace YYYYYYYYYY: Unknown error occurred
while importing messages for message channel XXXXXXXX...`
This commit is contained in:
Guillim
2025-04-17 14:16:05 +02:00
committed by GitHub
parent 71dbd1d66b
commit 1401f80081
2 changed files with 11 additions and 4 deletions

View File

@ -162,11 +162,11 @@ export class MessageImportExceptionHandlerService {
);
this.exceptionHandlerService.captureExceptions([
`Unknown error occurred while importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}: ${exception.message}`,
`Unknown error importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}: ${exception.message}`,
]);
throw new MessageImportException(
`Unknown error occurred while importing messages for message channel ${messageChannel.id} in workspace ${workspaceId}: ${exception.message}`,
exception.message,
MessageImportExceptionCode.UNKNOWN,
);
}