JustinCanton / Geo.NET

A lightweight method for communicating with the multiple online geocoding APIs.
MIT License
13 stars 8 forks source link

fix(here): Adding missing enum values on ResultType #72

Closed Farthom closed 1 year ago

Farthom commented 1 year ago

The saga continues. I've encountered the following error: Geo.Here.Models.Exceptions.HereException: Failed to parse the Here response properly. See the inner exception for more information. ---> Newtonsoft.Json.JsonSerializationException: Error converting value "postalCodePoint" to type 'Geo.Here.Enums.ResultType'. Path 'items[0].resultType', line 1, position 158. ---> System.ArgumentException: Requested value 'postalCodePoint' was not found.

The issue is due to the fact that there appears to be 4 valid response values not captured in the ResultType enum. I have added them in accordance with this document: https://developer.here.com/documentation/geocoding-search-api/dev_guide/topics/result-types.html

JustinCanton commented 1 year ago

Hmmm, I wonder if it isn't more worth it to drop the enum and just use a string value instead. If new enum values keep getting added, this could break again.

For now, this looks good though.