Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Missing Bing EntityType enum value PointOfInterest #155

Open

Description

@ascott18
Geocoding.Microsoft.BingGeocodingException
  HResult=0x80131500
  Message=There was an error processing the geocoding request. See InnerException for more information.
  Source=Geocoding.Microsoft
  StackTrace:
   at Geocoding.Microsoft.BingMapsGeocoder.<GeocodeAsync>d__40.MoveNext()

  This exception was originally thrown at this call stack:
    System.Enum.TryParseByName(System.RuntimeType, System.ReadOnlySpan<char>, bool, bool, out ulong)
    System.Enum.TryParseInt32Enum(System.RuntimeType, System.ReadOnlySpan<char>, int, int, bool, bool, System.TypeCode, out int)
    System.Enum.TryParse(System.Type, System.ReadOnlySpan<char>, bool, bool, out object)
    System.Enum.TryParse(System.Type, string, bool, bool, out object)
    Geocoding.Microsoft.BingMapsGeocoder.ParseResponse(Geocoding.Microsoft.Json.Response)
    Geocoding.Microsoft.BingMapsGeocoder.GeocodeAsync(string)

Inner Exception 1:
ArgumentException: Requested value 'PointOfInterest' was not found.

Activity

  1. ascott18 commented on Apr 27, 2022

    @ascott18
    Author

    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)
    
  2. chatay commented on Jun 4, 2022

    @chatay

    Hello @ascott18,
    can you at least share your request payload and more information to be able to reproduce the issue.

  3. ascott18 commented on Jun 14, 2022

    @ascott18
    Author

    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.

    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. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions