You are right, I should not be using a 404 to signify that there was no result 
to return. So I changed my server code to return a 204 (No Content) instead and 
now my fault handler gets called in the IDE with status code 0.

If 0 means no errors then I am curious as to why the fault handler gets called 
rather than the result handler, but I wonder if anything other than a 200 
results in the fault handler being triggered? 

Cheers

Paul
--- In [email protected], "valdhor" <valdhorli...@...> wrote:
>
> an event.statuscode of 0 means that there were no errors. You are checking if 
> the statuscode is NOT equal to 404. Is that what you really wanted to do?
> 
> 
> 
> --- In [email protected], "tendancer2000" <tendancer@> wrote:
> >
> > Just finished my first ever Flex app (yay!) and deployed it to my tomcat 
> > server and it is behaving differently there compared to when I run it 
> > within the IDE.
> > 
> > During the execution the Flex app makes an HTTPService call which returns a 
> > 404 if no data is found. My fault handler:
> > 
> > if (event.statusCode != 404)
> >    Alert.show("A problem occurred fetching the moderation history data: " + 
> > event.statusCode);
> > 
> > When run from within the IDE I get no alert, but when run from my tomcat 
> > server I get the alert and the status Code appears as "0", not even a 404. 
> > 
> > Can anyone suggest why this might be? Or any tips for debugging on the 
> > server? This is also my first attempt at a REST-ful application so maybe 
> > returning a 404 to signify 'no data found' isn't the best thing to do?
> > 
> > Cheers
> > 
> > Paul
> >
>


Reply via email to