HTTP 500 response with FlightInfoEx API


#1

I’m trying to access the FlightInfoEx API via REST and C#. I was able to pull down info 3 times yesterday, and since then, I’ve gotten an HTTP500 error.

Here’s my POST:



POST http://flightxml.flightaware.com/json/FlightXML2/FlightInfoEx HTTP/1.1 
Authorization: Basic **REDACTED==**
Host: flightxml.flightaware.com 
Content-Length: 11 
Expect: 100-continue 
Proxy-Connection: Keep-Alive 
ident=N12MU


Here’s the response:



HTTP/1.1 500 Internal Server Error 
Via: 1.1 varnish, 1.1 STAPX1000 
Connection: Keep-Alive 
Proxy-Connection: Keep-Alive 
Content-Length: 543 
Age: 0 
Date: Tue, 28 Apr 2015 17:11:55 GMT 
Content-Type: text/html; charset=iso-8859-1 
Server: FlightAware/3.1 
Vary: Accept-Encoding 
Accept-Ranges: bytes 
X-Varnish: 3142241935 
X-FA-Cache: MISS 
cache-control: max-age=5, must-revalidate 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
<html><head> 
<title>500 Internal Server Error</title> 
</head><body> 
<h1>Internal Server Error</h1> 
<p>The server encountered an internal error or 
misconfiguration and was unable to complete 
your request.</p> 
<p>Please contact the server administrator, 
support@flightaware.com and inform them of the time the error occurred, 
and anything you might have done that may have 
caused the error.</p> 
<p>More information about this error may be available 
in the server error log.</p> 
</body></html>


Unfortunately, this error doesn’t give me any information as to what’s wrong.

Could you please give me an idea of what I’m doing wrong, if anything?


#2

Can someone from FlightAware please look at the server log as the provided error message suggests? This is still happening.

More information about this error may be available in the server error log


#3

I am not able to replicate any problems accessing that ident through FlightXML. Additionally, your account (bradleym) is not enabled for FlightXML access so I cannot locate any activity for your account nor attempt to replicate the problem with your credentials.

{“FlightInfoExResult”:{“next_offset”:-1,“flights”:{“faFlightID”:“N12MU-1430240617-181-0”,“ident”:“N12MU”,“aircrafttype”:“BE9L”,“filed_ete”:“00:56:00”,“filed_time”:1430240610,“filed_departuretime”:1430242200,“filed_airspeed_kts”:233,“filed_airspeed_mach”:"",“filed_altitude”:160,“route”:“DJB V14 OBRLN ROD”,“actualdeparturetime”:1430247780,“estimatedarrivaltime”:1430251084,“actualarrivaltime”:1430250937,“diverted”:"",“origin”:“KCGF”,“destination”:“KOXD”,“originName”:“Cuyahoga County”,“originCity”:“Cleveland, OH”,“destinationName”:“Miami University”,“destinationCity”:“Oxford, OH”},{“faFlightID”:“N12MU-1430221669-72-0”,“ident”:“N12MU”,“aircrafttype”:“BE9L”,“filed_ete”:“00:57:00”,“filed_time”:1430221650,“filed_departuretime”:1430228700,“filed_airspeed_kts”:230,“filed_airspeed_mach”:"",“filed_altitude”:190,“route”:“DLZ315014 ZABER ZABER4”,“actualdeparturetime”:1430228760,“estimatedarrivaltime”:1430232145,“actualarrivaltime”:1430232159,“diverted”:"",“origin”:“KOXD”,“destination”:“KCGF”,“originName”:“Miami University”,“originCity”:“Oxford, OH”,“destinationName”:“Cuyahoga County”,“destinationCity”:“Cleveland, OH”},{“faFlightID”:“N12MU-1429726105-368-0”,“ident”:“N12MU”,“aircrafttype”:“BE9L”,“filed_ete”:“02:12:00”,“filed_time”:1429726099,“filed_departuretime”:1429732800,“filed_airspeed_kts”:233,“filed_airspeed_mach”:"",“filed_altitude”:160,“route”:“MRB V44 JPU”,“actualdeparturetime”:1429736820,“estimatedarrivaltime”:1429744436,“actualarrivaltime”:1429744320,“diverted”:"",“origin”:“KIAD”,“destination”:“KOXD”,“originName”:“Washington Dulles Intl”,“originCity”:“Washington, DC”,“destinationName”:“Miami University”,“destinationCity”:“Oxford, OH”},{“faFlightID”:“N12MU-1429687026-137-0”,“ident”:“N12MU”,“aircrafttype”:“BE9L”,“filed_ete”:“01:28:00”,“filed_time”:1429687019,“filed_departuretime”:1429694100,“filed_airspeed_kts”:230,“filed_airspeed_mach”:"",“filed_altitude”:190,“route”:“BOSTR YRK HVQ DOCCS2”,“actualdeparturetime”:1429695240,“estimatedarrivaltime”:1429700169,“actualarrivaltime”:1429700691,“diverted”:"",“origin”:“KOXD”,“destination”:“KIAD”,“originName”:“Miami University”,“originCity”:“Oxford, OH”,“destinationName”:“Washington Dulles Intl”,“destinationCity”:“Washington, DC”}]}}


#4

Thanks bovineone. I sent you a PM with the names of the accounts that we are using to connect.

Note that the connection works intermittently. Without changing any of our code, we can get a valid response about 25% of the time.


#5

Is that percentage for querying the same ident, or across multiple other idents?


#6

The exact same ident run over and over again sometimes works, but usually throws the 500 error. There is no change to the code or anything - simply re-running the exact same call produces a different response.


#7

This is the eighth day that we are still experiencing this issue. Can someone please look at the server logs like the FlightAware provided error message suggests?


<p>Please contact the server administrator, support@flightaware.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p>

<p>More information about this error may be available in the server error log.</p> 

We tried emailing support@flightaware.com as the error message commands, but were simply directed back to this message board.

Can an admin please assist? I’ve PM’d bovineone with the exact account information used.

Thank you,
Bradley


#8

It is already in the process of being investigated. Please remain patient.


#9

Thank you for the update.


#10

Good day. I was wondering if any additional information or tests are needed from us to assist in the resolution of this issue. Please let me know if there is any way I can help.

Thank you,
Brad


#11

bovineone,

Thanks for the PM. I’m posting the final resolution here too to support the community in case others encounter the same error.

We needed to include setting the ContentType header:


client.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";