MENA region data enrichment scripts` -> Wait, let's keep it concise and clean.

*   *Option 3:* `feat: add tourist landmarks support with UI sheets, data models
This commit is contained in:
Hamza-Ayed
2026-09-21 05:21:44 +03:00
parent cff5a8e1ce
commit dc9a736e26
29 changed files with 13396 additions and 1982 deletions
@@ -96,12 +96,35 @@ class MapSaasRepository {
return routes;
} else {
print("⚠️ [MapSaasRepo] Route fetch returned non-200 status: ${response.statusCode}, body: ${response.body}");
String? serverMsg;
try {
final errJson = jsonDecode(response.body);
serverMsg = errJson['message']?.toString();
} catch (_) {}
if (response.statusCode == 502 || response.statusCode == 503 || response.statusCode == 504) {
throw RouteException(
'خادم حساب المسارات قيد إعادة التشغيل أو التحديث (502)، يرجى المحاولة بعد لحظات.',
statusCode: response.statusCode,
);
} else if (response.statusCode == 422) {
throw RouteException(
serverMsg ?? 'الموقع المحدد خارج نطاق التغطية المعتمدة لشبكة الطرق.',
statusCode: response.statusCode,
);
} else {
throw RouteException(
serverMsg ?? 'تعذر حساب المسار حالياً (${response.statusCode}).',
statusCode: response.statusCode,
);
}
}
} on RouteException {
rethrow;
} catch (e) {
print("❌ [MapSaasRepo] getRoute exception: $e");
throw const RouteException('تعذر الاتصال بالخادم، يرجى التحقق من اتصال الإنترنت والمحاولة مجدداً.');
}
return [];
}
RouteData _parseRouteData({