Posted At : October 28, 2006 8:23 PM
Also when errors occur and cf is configured to set HTTP status codes many errors will return a 500 status code and much of the information will not get passed from the browser to the flex client.
One way to see what is going on is to redirect everything through the java sniffer application that comes with cfmx
However - there are many places where this does not work - for example if your application is working perfectly on your development machine but not when you push it live (or to staging - we're all using staging servers right!)
In this situation you may not be able to view the traffic so you end up searching all the logs looking for errors.
In order to prevent the 500 errors from occuring I have now taken to adding a status field and a message field to the return values of all webservice methods. There is then a try catch around the whole method which passes back a reasonably useful error message if something goes wrong.
The status field will return true if it is successful and false if something went wrong. Your application can then display the message somewhere in your application so that you have a clue what has gone wrong.
0 Comments