Hi folks,
I have a Flex 3 client interfacing to an RoR webservice for a POST request. When the webservice returns code 201 Created, Flex fires a resultEvent and everything is cool as I'm able to parse the XML response as you would expect.
However, when there is a problem with the data sent in a POST request, the webservice returns 422 and Flex thus fires a faultEvent. Along with the 422 code, the webservice also supplies a list of errors to be corrected by the user before resubmission. I can see these in Charles. An example is the following:
<errors>
<error>Username and password invalid</error>
</errors>
I need to be able to access this XML within Actionscript. For a resultEvent this is easily done using event.result. However, for a faultEvent I can't see any way of accessing the XML returned.
Does anyone know if this is possible? Or am I missing something patently obvious?
Thanks in advance,
Dave