Better client/login/authState handling
This commit is contained in:
13
flutter/lib/api/api_exception.dart
Normal file
13
flutter/lib/api/api_exception.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class APIException implements Exception {
|
||||
final int httpStatus;
|
||||
final String error;
|
||||
final String errHighlight;
|
||||
final String message;
|
||||
|
||||
APIException(this.httpStatus, this.error, this.errHighlight, this.message);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '[$error] $message';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user