feat : segment page
This commit is contained in:
@@ -110,6 +110,11 @@ bool _isRetryableError(dynamic error) {
|
||||
|
||||
String _getErrorMessage(dynamic error) {
|
||||
if (error is DioException) {
|
||||
final responseData = error.response?.data;
|
||||
if (responseData is Map<String, dynamic> && responseData['result'] != null) {
|
||||
return responseData['result'].toString();
|
||||
}
|
||||
|
||||
switch (error.type) {
|
||||
case DioExceptionType.connectionTimeout:
|
||||
return 'خطا در اتصال - زمان اتصال تمام شد';
|
||||
|
||||
Reference in New Issue
Block a user