← Back to team overview

dhis2-devs team mailing list archive

[d2 lib] - API call failing with "Server connection failed for API request"


I'm using d2 to fetch some data inside a DHIS2 app. Everything looks to be
working well, until I have a query using event analytics.

As the d2 lib don't have models yet (I think) for this, I'm making direct
calls using get, for example:

return getInstance().then(d2 =>

This works perfectly, I see the query go through the network view, and the
values get back

Now I'm trying a event analytics query:

return getInstance().then(d2 =>

And this show an error in the console with  "Server connection failed for
API request"

I've ran the query through the browser & Postman without any problems. I've
debugged, the authorization header is correct.

Any clue what could go wrong there?



*Martin Van Aken - **Freelance Enthusiast Developer*

Mobile : +32 486 899 652

Follow me on Twitter : @martinvanaken <http://twitter.com/martinvanaken>
Call me on Skype : vanakenm
Hang out with me : martin@xxxxxxxxxxxxxxxx
Contact me on LinkedIn : http://www.linkedin.com/in/martinvanaken
Company website : www.joyouscoding.com

Follow ups