You created and fired off a request to a server with whatever you did in Ajax. So far, so good. The server tried to process your request but ran into an error condition. That's usually caused by some bug in the server code.
As John Saunders advises, you can usually get more information on the server-side problem by looking into its logs.