feat(logging): add logging to chat bloc history and attachments
This commit is contained in:
@@ -75,7 +75,13 @@ extension _ChatBlocAttachments on ChatBloc {
|
||||
final bytes = await _service.fetchAttachmentPreview(previewPath);
|
||||
_attachmentPreviewCache[previewPath] = bytes;
|
||||
return bytes;
|
||||
} catch (_) {
|
||||
} catch (e, stackTrace) {
|
||||
_logger.error(
|
||||
message: 'Failed to load attachment preview',
|
||||
error: e,
|
||||
stackTrace: stackTrace,
|
||||
extra: {'preview_path': previewPath},
|
||||
);
|
||||
return null;
|
||||
} finally {
|
||||
_attachmentPreviewInflight.remove(previewPath);
|
||||
|
||||
Reference in New Issue
Block a user