kevbite / CompaniesHouse.NET

A simple .NET client wrapper for CompaniesHouse API
MIT License
37 stars 44 forks source link

JsonSerializationException: persons-with-significant-control #200

Closed johnmackerras closed 1 year ago

johnmackerras commented 1 year ago

Hi,

Am recieving the following error, which means an additional type to NaturesOfControl for PSC is needed

ArgumentException: Requested value 'ownership-of-shares-more-than-25-percent-registered-overseas-entity' was not found.
Newtonsoft.Json.Utilities.EnumUtils.ParseEnum(Type enumType, NamingStrategy namingStrategy, string value, bool disallowNumber)

JsonSerializationException: Error converting value "ownership-of-shares-more-than-25-percent-registered-overseas-entity" to type 'CompaniesHouse.Response.PersonsWithSignificantControl.PersonWithSignificantControlNatureOfControl'.
Path 'items[0].natures_of_control[0]', line 1, position 640.

Test companies: these issues appeared when I was calling down the PSC info for companies with Registration Numbers 'OE009284' and 'OE005800'.