TypeError: Cannot read properties of undefined (reading 'country_code')
at OpenStreetMapGeocoder._formatResult (/home/ec2-user/superset/node_modules/.pnpm/node-geocoder@4.2.0/node_modules/node-geocoder/lib/geocoder/openstreetmapgeocoder.js:71:38)
at /home/ec2-user/superset/node_modules/.pnpm/node-geocoder@4.2.0/node_modules/node-geocoder/lib/geocoder/openstreetmapgeocoder.js:58:34
at tryCatcher (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/util.js:16:23)
at Promise.successAdapter [as _fulfillmentHandler0] (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/nodeify.js:23:30)
at Promise._settlePromise (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:601:21)
at Promise._settlePromise0 (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues (/home/ec2-user/superset/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (node:internal/timers:466:21)
Fixes https://github.com/nchaulet/node-geocoder/issues/350.
I would really appreciate if this could be merged in the near future, as it's affecting the uptime of my app.
Usage (the try/catch doesn't help):
Error: