feat(logging): add logging to chat bloc history and attachments
This commit is contained in:
@@ -214,7 +214,16 @@ class ChatBloc extends Cubit<ChatState> implements ChatOrchestrator {
|
||||
|
||||
final epoch = ++_sessionEpoch;
|
||||
_activeUserId = normalizedUserId;
|
||||
await _service.setUserContext(normalizedUserId);
|
||||
try {
|
||||
await _service.setUserContext(normalizedUserId);
|
||||
} catch (e, stackTrace) {
|
||||
_logger.error(
|
||||
message: 'Failed to set user context',
|
||||
error: e,
|
||||
stackTrace: stackTrace,
|
||||
extra: {'user_id': normalizedUserId},
|
||||
);
|
||||
}
|
||||
if (epoch != _sessionEpoch) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user