Exit the geocode job if we hit an error

This commit is contained in:
Eli Ribble 2026-04-15 19:31:55 +00:00
parent 87c802fa90
commit 6a8ae6d81a
No known key found for this signature in database

View file

@ -150,9 +150,11 @@ func geocodePool(ctx context.Context, txn bob.Tx, client *stadia.StadiaMaps, job
geo, err := geocode.GeocodeStructured(ctx, job.org, a)
if err != nil {
addError(ctx, txn, job.csv, job.rownumber, 0, err.Error())
return nil
}
if geo.Address.Location == nil {
return fmt.Errorf("nil location")
addError(ctx, txn, job.csv, job.rownumber, 0, fmt.Sprintf("nil location from geocoding"))
return nil
}
geom_query := geom.PostgisPointQuery(*geo.Address.Location)
_, err = psql.Update(