views:

21

answers:

1

Flex HTTPService faults end up wrapped in a fault object that seems to obscure the actual returned text. Right now, I return a custom 400/409 error response to service clients that contains useful information about the cause of the error, which I'd like to have displayed to that client.

How can I, given a fault event, get the actual text of the HTTP error response?

+2  A: 

You can't unless you use a server proxy like BlazeDS that transforms non-200 responses into 200 responses. Or if you control the server-side then force the error responses to be HTTP 200. This problem is due to a limitation in the browser (NPAPI) that prevents non-200 responses from being passed to plugins.

James Ward
Oh, god, that's ugly.
Chris R
Yeah. Some browsers have fixed the issue recently but it's not widespread enough to rely on.
James Ward