debug: add extensive logging and error handling for series

This commit is contained in:
Claude 2025-11-20 19:29:23 +00:00
parent e4a522cc0d
commit f4d1914b21
No known key found for this signature in database
2 changed files with 67 additions and 29 deletions

View file

@ -19,8 +19,20 @@ class LibrarySeriesPage extends HookConsumerWidget {
body: seriesAsync.when(
data: (seriesList) {
if (seriesList.isEmpty) {
return const Center(
child: Text('No series found'),
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.library_books_outlined, size: 48),
const SizedBox(height: 16),
const Text('No series found'),
const SizedBox(height: 8),
Text(
'Check logs for API response details',
style: Theme.of(context).textTheme.bodySmall,
),
],
),
);
}
@ -37,13 +49,25 @@ class LibrarySeriesPage extends HookConsumerWidget {
child: CircularProgressIndicator(),
),
error: (error, stack) => Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.error_outline, size: 48, color: Colors.red),
const SizedBox(height: 16),
Text('Error loading series: $error'),
],
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.error_outline, size: 48, color: Colors.red),
const SizedBox(height: 16),
Text(
'Error loading series:',
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 8),
Text(
'$error',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium,
),
],
),
),
),
),