Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Blog Reader Android App Getting Data from the Web Getting JSON Data from an HTTP Request

Samuel Zachery
PLUS
Samuel Zachery
Courses Plus Student 3,234 Points

what could be causing a 502 error?

I am trying to run the app on my physical nexus 5 from android studio.

In the logcat im getting: "Unsuccessful HTTP Response Code: 502" what could be causing this? any ideas on where to look for a solution?

Well a HTTP error code of 5xx is related to server errors.

Description: 502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server.

I would first check the server, as the application is communicating with the server or else you wouldn't get the response code.