From 2252dd2fd6a26c907f2cf5df0b294da08fbb9fdd Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 3 Nov 2025 22:10:00 +1100 Subject: [PATCH] Thumbnail errors (#708) * Extract error info from thumbnail errors * Formatting --- lib/api.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/api.dart b/lib/api.dart index 5d79a22a..7ea44aca 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -1545,8 +1545,15 @@ class InvenTreeAPI { return CachedNetworkImage( imageUrl: url, placeholder: (context, url) => CircularProgressIndicator(), - errorWidget: (context, url, error) => - Icon(TablerIcons.circle_x, color: COLOR_DANGER), + errorWidget: (context, url, error) { + print("CachedNetworkimage error: ${error.toString()}"); + return GestureDetector( + child: Icon(TablerIcons.circle_x, color: COLOR_DANGER), + onTap: () => { + showSnackIcon(error.toString().split(",")[0], success: false), + }, + ); + }, httpHeaders: defaultHeaders(), height: height, width: width,