fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user