This project is archived and is in readonly mode.

#3222 ✓duplicate
Peter Nash

ActiveResource is not extracting errors from an XML response if the Content-Type is 'application/xml; charset=utf-8'

Reported by Peter Nash | September 17th, 2009 @ 12:45 PM

A change to ActiveResource::Validations was introduced in 2.3.4 which adds support for JSON errors:

The following test was added to the "save_with_validation" method:

  case error.response['Content-Type']
  when 'application/xml'
  when 'application/json'

This is looking for an exact match on Content-Type 'application/xml'.

If, for example, the returned Content-Type is 'application/xml; charset=utf-8' then the error response is ignored.

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=""></a>

People watching this ticket