This project is archived and is in readonly mode.

#2481 ✓committed
Chris Bielinski

Console/log output for malformed XML requests is not very helpful

Reported by Chris Bielinski | April 11th, 2009 @ 04:06 AM | in 2.3.4

Hey guys,

First time patcher here, so go easy on me. I'm writing a REST service in Rails and a client in Flex. I knew my Flex app was sending malformed data but I had no way of inspecting it. The Rails log output really wasn't very helpful:


/!\ FAILSAFE /!\  Fri Apr 10 19:44:12 -0700 2009
  Status: 500 Internal Server Error
  You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name

So my patch simply echo's the actual raw request and provides much more information:


It seems there was an error parsing the request.
The raw request is provided below:

some-malformed-XML-string-here

/!\ FAILSAFE /!\  Fri Apr 10 19:44:12 -0700 2009
  Status: 500 Internal Server Error
  You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name

My patch uses puts (is that okay?)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages