Flight Plan API issue

Hi Cam. I have a question about live api v2. When I try to get a flight plan of a flight, it sometimes gives me a 400 error. Why is this happening?

No errors on my end. You’ll get a 400 if the flight is a previous flight though, flight plans are only saved for the duration of the flight.

2 Likes

No. Firstly, I get all the flights through Liveapi, and then I try to get flight plan of some flights in less than ten seconds, about 30% of the requests will return 400 error.

I just want to know what is the meaning of 400 error. I guess that maybe these flights have just joined the game, and they did not set their flight plan.

Do you have some example flight IDs that I can check?

3 Likes

Of course :)

33066936-63e0-4cf9-9ca3-d8775d342b8e
888a1638-4629-4b61-a893-fda9db5abc69

1 Like

Thanks!

It doesn’t look like those flights have FPLs filed, which is why you are getting a 400 (it should contain error code 6 in the body in that case).

I am looking into an issue where flight plans may not show if a user has a connection issue mid-flight which might be related to this.

5 Likes

Thanks a lot! May I ask when can this problem be fixed?

I’ll include some improvements in 21.1 (needs an app update)

3 Likes

OK. It looks like I should catch and handle the 400 error.

Yep, always handle the errors where possible, the error codes normally give some information about what is going on to help you handle it properly (server error vs missing flight plan). Hope this helps!

2 Likes