mirror of
https://github.com/skidoodle/hostinfo
synced 2026-04-28 01:27:36 +02:00
always return something...
This commit is contained in:
+4
-1
@@ -32,7 +32,7 @@ export const GeoService = {
|
|||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('Geo lookup failed for', ip, error);
|
console.warn('Geo lookup failed for', ip, error);
|
||||||
return {
|
const failedData: GeoData = {
|
||||||
ip,
|
ip,
|
||||||
hostname: null,
|
hostname: null,
|
||||||
countryCode: null,
|
countryCode: null,
|
||||||
@@ -45,6 +45,9 @@ export const GeoService = {
|
|||||||
isLocal: false,
|
isLocal: false,
|
||||||
isBogon: false
|
isBogon: false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
await StorageService.setGeoCache(ip, failedData);
|
||||||
|
return failedData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user