0e19aa0521
- Implemented Error Log API to capture and store error logs from various services. - Updated admin_ui to include Error Log Viewer component for inspecting logs. - Enhanced error handling in auth_api, employee_api, and transit_api to report errors to the Error Log API. - Modified existing services to utilize the new error logging functionality. - Updated Docker Compose configuration to include the Error Log API service. - Added error logging service in bus_terminal for Flutter application.
17 lines
375 B
Dart
17 lines
375 B
Dart
// Custom exception for authentication errors
|
|
import 'app_navigator.dart';
|
|
|
|
class UnauthorizedException implements Exception {
|
|
final String message;
|
|
|
|
UnauthorizedException(this.message) {
|
|
// Trigger centralized logout/navigation asynchronously
|
|
try {
|
|
handleAuthExpired(message: message);
|
|
} catch (_) {}
|
|
}
|
|
|
|
@override
|
|
String toString() => message;
|
|
}
|