2

what are the possible reasons (possibilities) of receiving 500 and Internal Server Error as the state code and the status line of the json post response. code is perfectly working in the other project. and the url is perfectly working for the I OS.

thank you.

Dinithe Pieris
  • 1,822
  • 3
  • 32
  • 44

4 Answers4

6

500 Internal Server Error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable

If the HTTP POST method or the class is correct, its nothing wrong from the client side (Android application). The problem occurred from the server side. The application state code and the status line of the JSON post response receives 500 until you fix the bug in the server side.

Note: without fixing this bug can be worked perfectly the same URL for iOS.

How to do a HTTP Post in Android?

Zoe
  • 27,060
  • 21
  • 118
  • 148
Dinithe Pieris
  • 1,822
  • 3
  • 32
  • 44
1

While testing socioauth library from link

http://www.3pillarglobal.com/insights/part-1-using-socialauth-to-integrate-facebook-api-in-android

It is found that within some time interval, facebook not allowing to post message. But after some time it allowd.

Within that time period we get this 500 status code error.

In SocioAuthAdapter class in method updateStatus we get that message in catch block..

Customize your message accordingle...

0

In my experience, it can be sometimes misleading to think it is a server error. If the parameters expected, do not match that of the service requested then, the server throws 500, as it cannot find a specific service to address the request and parameter combination.
Ex: One of our services expected 4 parameters and we had passed three the server (Tomcat 8) we kept getting "HTTP Status 500 – Internal Server Error" until we corrected our service call. I am assuming that our services were built as per standard specifications.

-3

The 500 Error is server intern. Your call could be correct!

For example, if you register a user with POST the first time it works, but the second time u try to register the same user again, i will get a 500 Error.

Think about the circumstances that could occur this error. And post your code, so we can help you.

[http://en.wikipedia.org/wiki/List_of_HTTP_status_codes][1]

Friedolino
  • 114
  • 8
  • this is probably not the answer. 500 Internal Server Error is correct so its nothing wrong from the client side (Android application). The problem occurred from the server side. Application is not responding every time till fix the bug in the server side. – Dinithe Pieris Feb 11 '14 at 08:36