# Exception return from FlightInfoStatus API

**URL:** https://discussions.flightaware.com/t/exception-return-from-flightinfostatus-api/29365
**Category:** Aviation
**Created:** [December 22, 2017, 3:01am UTC](https://discussions.flightaware.com/t/exception-return-from-flightinfostatus-api/29365 "2017-12-22T03:01:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![shaulzak](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/shaulzak/32/55133_2.png) [@shaulzak](https://discussions.flightaware.com/u/shaulzak)
#### Post date: [December 22, 2017, 3:01am UTC](https://discussions.flightaware.com/t/exception-return-from-flightinfostatus-api/29365/1 "2017-12-22T03:01:16Z")

</div>

I keep getting “{“The data contract type ‘FlightawareServiceReference.ArrayOfFlightInfoStatusStruct’ cannot be deserialized because the required data members ‘PropertyChanged, flightsField, next\_offsetField’ were not found.”}”  
when trying to deserialize the result.  
have any idea why and what to do?

Here is the code -  
private const string fxmlUrl = “[http://flightxml.flightaware.com/json/FlightXML3”](http://flightxml.flightaware.com/json/FlightXML3%E2%80%9D);  
private const string username = “MYUSERNAME”;  
private const string apiKey = “MYAPIKEY”;  
private static UriBuilder uriBuilder = new UriBuilder(fxmlUrl);

```
public static void GetFlightData(string flightName)
{
    var requestUrl = fxmlUrl.AppendPathSegment("FlightInfoStatus")
            .SetQueryParams(new { ident = "CAP85" });
    ProcessRepositories(requestUrl, username, apiKey).Wait();
}

private static async Task ProcessRepositories(string apiUrl, string username, string apiKey)
{
    var serializer = new DataContractJsonSerializer(typeof(ArrayOfFlightInfoStatusStruct));
    var client = new HttpClient();
    var credentials = Encoding.ASCII.GetBytes(username + ":" + apiKey);
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(credentials));

    var streamTask = client.GetStreamAsync(apiUrl);
    try
    {
        var arrayOfFlightInfoStatusStruct = serializer.ReadObject(await streamTask);// as ArrayOfFlightInfoStatusStruct;
    }catch(Exception e)

```

Thanks
