Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I realize that this may spur a religious discussion, but I discussed this with friends and get great, but conflicting answers and the actual documentation is of little help.

What does the 500 series response codes mean from the webserver? Internal Server Error, but that is vague. My assumption is that it means that something bad happened to the server (file system corruption, no connection to the database, network issue, etc.) but not specifically a data driven error (divide by zero, record missing, bad parameter, etc).

Something to note, there are some web client implementations (the default Android and Blackberry httpclients) that do not allow access to the html boddy if the server response is 500 so there is no way to determine what caused the issue from the client.

What I have been been implementing recently is a web service that returns a json payload wrapped in a response object that contains more specific error information if it is data related, but the server response will be 200 since it finished the actual processing.


share|improve this question

In general, 500 means something went wrong on the server-side at no fault of the users. This could be any unexpected exception from your back-end, including the "data driven" errors you talked about.

If the user did something wrong to cause a failure, a 400-level error code should be returned.

share|improve this answer
you reinforced my point. I looked through the codes as defined by the w3c for the 400 series [] and I believe that those are for resource issues (not found error or proxy authentication required) but I don't think they fit if the user provides a bad parameter or variable type maybe. – Bryan Kemp Jun 28 '12 at 3:30
HTTP 400 is BAD REQUEST, which usually gets thrown if the user provides a bad parameter. I find the wikipedia page on HTTP codes a useful reference for this sort of stuff. – Oleksi Jun 28 '12 at 3:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.