Server Errors Suck 

Server errors are usually the last things people think of when their application craps out. You can spend hours on a wild goose chase sifting through source code, only to find out it’s the damn server that’s the culprit. Here are a few error codes that I have run into. Remember, if something doesn’t  seem right check your HTTP response headers with Fiddler, Charles, or something similar.

500: Internal Server Error

Description: The server encountered an unexpected condition which prevented it from fulfilling the request.

I used to run into this one when attempting to receive an XML response from an application server. Usually this means the server-side application is broken somehow.

 404: Not Found

Description: The server has not found anything matching the Request-URI.

The infamous 404. This one seems simple, but can can be a sneaky s.o.b. If you swear the file is there, it usually means the server has not been configured to serve the needed mime-type (file extension). This is common if you setup custom server configurations. I have ran into this a few times for FLVs (flash video) and XAPs (silverlight). My co-worker once ran into a server not set up to serve XML. What server doesn’t serve XML!?

206: Partial Content

Description: The server has fulfilled the partial GET request for the resource.

This one is weird and I still don’t completely understand it. From what I understand, this occurs when the  browser or server thinks part of the requested data has been cached. The browser then only asks for part of the file or the server only responds with part of the file. The problem here is, that if the browser does not have the request cached you end up with incomplete data. In Flash the symptom of this is a value of -1 returned by bytesTotal. In my co-workers encounter we moved the FLVs to an alternate server and this fixed the problem.

Catetgories: code

Post a Comment