It looks like an issue on the API’s side? Maybe it doesn’t answer fast enough (are you hosting it locally? that could be it), or it responds with an error. Have you checked the API in a browser whenever this error message appears?
I believe you have control over the API? In which case, may I suggest following the best practices when building an API that responds with JSON: avoid keys with spaces or dashes -, prefer camelCase, the reason is because otherwise you need to use brackets [] to reach the values.