Docs: improve error message if something goes wrong in the image upload

This commit is contained in:
Pieter Vander Vennet 2024-12-06 01:20:41 +01:00 committed by Midgard
parent 5b3ca7e85c
commit 11bc87c9db
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -170,6 +170,9 @@ export class ImageUploadManager {
}
if (location === undefined || location?.some((l) => l === undefined)) {
feature ??= this._indexedFeatures.featuresById.data.get(featureId)
if(feature === undefined){
throw "ImageUploadManager: no feature given and no feature found in the indexedFeature. Cannot upload this image"
}
location = GeoOperations.centerpointCoordinates(feature)
}
try {