Correct format for errors returned from a REST server?

What's the correct format for returning informative errors from a REST server. Error code 500 isn't enough. I want to see a description of the error, but how can I format the XML correctly to put some useful information in.

This is a Rails client working with a non-Rails server.

Thanks

John Small

a few links here might help. http://www.google.com/search?rlz=1C1CHMA_enUS312US312&sourceid=chrome&ie=UTF-8&q=rails+how+to+render+500+text

a few links here might help. rails how to render 500 text - Google Search

Those links seem to be mostly about formating code 500 errors for public viewing on a webpage.

I think the easiest way to do this is to create a Rails REST server, force it to have a code 500 error, and then see what it sends to the client. That way I'll find something about how the Rails client expects to see code 500 errors presented in a REST conversation. I'll do that later on today.

John Small