go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.26k stars 193 forks source link

Improve error message for gpkg register #805

Closed ear7h closed 2 years ago

ear7h commented 2 years ago

I just ran into the panic from #761 because I misspelled something in my config.

My suggestion would be to add a check to this block https://github.com/go-spatial/tegola/blob/a64417e76597128814ac1cf8154b7e612460700c/provider/gpkg/gpkg_register.go#L312-L323

along the lines of:

_, ok := geomTableDetails[tablename]
if !ok {
    return nil, errors.New("table " + tablename + " does not exist")
}
ARolek commented 2 years ago

@ear7h seems like a good one. If you send in a PR I will review it.