kevbite/CompaniesHouse.NET

Cannot convert null value to CompaniesHouse.Response.FilingHistoryStatus

johnmackerras opened this issue · 1 comments

Recieved the above error when executig the GetCompanyFilingHistoryAsync for the Company number 'RS007401'

var hist = await client.GetCompanyFilingHistoryAsync("RS007401");

An unhandled exception occurred while processing the request.

JsonSerializationException: Cannot convert null value to CompaniesHouse.Response.FilingHistoryStatus. Path 'filing_history_status', line 1, position 81.

Newtonsoft.Json.Converters.StringEnumConverter.ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)

Hey @johnmackerras 👋, thanks for raising the issue, I've added a fix in to deal with null coming back from the API, this should default to a value of None.

This fix is in version 7.8.2.