Repository navigation
Tags
Tags
fix(import): Catch warning from unsupported hierarchy entries (#149) During an import I noticed an error like the following: error TypeError: Cannot read properties of undefined (reading 'name') at /code/import/source/whosonfirst/map/hierarchies.js:26:62 at Array.forEach (<anonymous>) at Object.mapper [as hierarchies] (/code/import/source/whosonfirst/map/hierarchies.js:24:15) at mapper (/code/import/source/whosonfirst/map/place.js:39:7) at DestroyableTransform._transform (/code/import/mapperStream.js:7:21) at Transform._read (/code/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:166:10) at Transform._write (/code/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:155:83) at doWrite (/code/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:390:139) at writeOrBuffer (/code/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:381:5) at Writable.write (/code/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:11) After some investigation these errors don't appar to be hurting anything, they happen when a record in a layer we don't currently support is imported. In this case it was the `postalregion` layer. We could consider supporting that layer in the future, which I think is also easy, but in the meantime we should at least silence these errors.
PreviousNext