Improve error message for lat/long missing #80

This commit is contained in:
Michael Mayer 2018-12-19 02:37:05 +01:00
parent e3b327f1af
commit d2ba33d5f4

View file

@ -49,7 +49,7 @@ func (m *MediaFile) GetLocation() (*models.Location, error) {
if exifData, err := m.GetExifData(); err == nil {
if exifData.Lat == 0 && exifData.Long == 0 {
return nil, errors.New("lat and long are missing in Exif metadata")
return nil, errors.New("lat and long are missing in metadata")
}
url := fmt.Sprintf("https://nominatim.openstreetmap.org/reverse?lat=%f&lon=%f&format=jsonv2", exifData.Lat, exifData.Long)