Error 400 "Bad Request" all of a sudden

Hi. I am using your API via .net, it’s been working for quite awhile, and now all of a sudden get an error 400 “Bad Request” when using

Dim response As System.Net.HttpWebResponse = request.GetResponse()

Would it have anything to do with this update:

“Updated various API endpoints to handle both Navigraph and SimBrief account types.”

If so, where do I now find info on the correct changes to make?
James

Are you trying to fetch a flight plan for your account “737SimGuy”?

In the XML fetcher, error code 400 just means that no flight plan is on file for that user. It should have been accompanied with a short XML error message explaining this:

<OFP>
<fetch>
<userid>123456</userid>
<static_id/>
<status>Error: No flight plan on file for the specified user</status>
<time>0.0619</time>
</fetch>
</OFP>

Basically, it’s probably been too long since you generated your flight plan. Simply create a new one and it should work for you again.

1 Like

Yes that’s what I was trying. And yes it has been quite awhile since I created a flightplan so I will try your suggestion soon as I get a chance. However I did not get an error explanation but that could be because .NET just throws an exception.

Thank you,
James

You were correct about the issue. Works fine after creating a new OFP. Strange thing is the .NET web http functionality does not recognize the 400 code error and throws an exception calling it a “Bad Request”. No worries though I’ve changed my code to handle it myself.

Thank you for the info!

James

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.