This commit is contained in:
pradeepkumar
2026-03-30 15:35:35 +05:30
parent 857983821d
commit f7881c7fed
3 changed files with 26 additions and 12 deletions

View File

@@ -412,7 +412,12 @@ class AgentDetailNotifier extends StateNotifier<AgentDetailState> {
);
} catch (e) {
if (!mounted) return;
state = state.copyWith(isLoading: false, error: e.toString());
final errStr = e.toString();
if (errStr.contains('403') || errStr.contains('Forbidden') || errStr.contains('permission') || errStr.contains('only visible')) {
state = state.copyWith(isLoading: false, error: 'PERMISSION_DENIED');
} else {
state = state.copyWith(isLoading: false, error: errStr);
}
}
}