For flights like that one which operate outside of our primary coverage areas, we only have a reduced number of data sources for our flight tracking so the results can sometimes be less reliable particularly in unusual flight conditions.
In the case of a flight diversion, FlightInfoEx will return two (or more) row for the same faFlightID value. One row will contain the original origin and destination, and the other will contain the new destination. One of the rows will also have the “diverted” field set to “t” to indicate that it was diverted.
For example, in JSON:
{“faFlightID”:“GOW517-1487138220-airline-0138:0”,“ident”:“GOW517”,“aircrafttype”:“A320”,“filed_ete”:“05:36:00”,“filed_time”:1487138220,“filed_departuretime”:1487118600,“filed_airspeed_kts”:81,“filed_airspeed_mach”:“”,“filed_altitude”:0,“route”:“”,“actualdeparturetime”:1487119680,“estimatedarrivaltime”:1487143453,“actualarrivaltime”:1487119680,“diverted”:“”,“origin”:“VABB”,“destination”:“VOMM”,“originName”:“Chatrapati Shivaji Int’l”,“originCity”:“Mumbai”,“destinationName”:“Chennai Int’l”,“destinationCity”:“Chennai / Madras”},
{“faFlightID”:“GOW517-1487138220-airline-0138:0”,“ident”:“GOW517”,“aircrafttype”:“A320”,“filed_ete”:“05:36:00”,“filed_time”:1487138220,“filed_departuretime”:1487118600,“filed_airspeed_kts”:81,“filed_airspeed_mach”:“”,“filed_altitude”:0,“route”:“”,“actualdeparturetime”:-1,“estimatedarrivaltime”:-1,“actualarrivaltime”:-1,“diverted”:“t”,“origin”:“VABB”,“destination”:“VOBL”,“originName”:“Chatrapati Shivaji Int’l”,“originCity”:“Mumbai”,“destinationName”:“Bengaluru Int’l”,“destinationCity”:“Bangalore, Karnataka”}
I would also recommend you use the ICAO version of that flight in all FlightXML requests (“GOW517” instead of “G8517”), when possible. That will minimize some potential problems of not returning the flight you are actually intending.