handle empty responses in the api app