Open ascott18 opened 2 years ago
Another one - GeoRegion
Geocoding.Microsoft.BingGeocodingException: There was an error processing the geocoding request. See InnerException for more information.
---> System.ArgumentException: Requested value 'GeoRegion' was not found.
at System.Enum.TryParseByName(RuntimeType enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, UInt64& result)
at System.Enum.TryParseInt32Enum(RuntimeType enumType, ReadOnlySpan`1 value, Int32 minInclusive, Int32 maxInclusive, Boolean ignoreCase, Boolean throwOnFailure, TypeCode type, Int32& result)
at System.Enum.TryParse(Type enumType, ReadOnlySpan`1 value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
at System.Enum.TryParse(Type enumType, String value, Boolean ignoreCase, Boolean throwOnFailure, Object& result)
at Geocoding.Microsoft.BingMapsGeocoder.ParseResponse(Response response)
at Geocoding.Microsoft.BingMapsGeocoder.GeocodeAsync(String address)
--- End of inner exception stack trace ---
at Geocoding.Microsoft.BingMapsGeocoder.GeocodeAsync(String address)
at Geocoding.Microsoft.BingMapsGeocoder.Geocoding.IGeocoder.GeocodeAsync(String address)
Hello @ascott18, can you at least share your request payload and more information to be able to reproduce the issue.
Unfortunately the request payload includes privileged customer data that I cannot share.
The issue here is quite straightforward - there are enum values that Bing will return that this library does not support.
Sorry, I realized that the bing search SDK is not actually the bing maps SDK - there doesn't seem to be a bing maps SDK.PointOfInterest
is defined here in the official bing SDK - https://github.com/microsoft/bing-search-sdk-for-net/blob/1fec1d7bb3776cca86db7b6fcd340e59db3d0d3c/sdk/EntitySearch/src/Generated/Models/EntityType.cs#L39. Note that the official SDK simply uses strings for these values, not enums, since the API could start returning new values at any time. GeoRegion
seems to be so new that it doesn't even have a declared const in the official SDK.