json error handling and flightcontroller changes