I did the same way, but I feel uncomfortable coupling the server side with UI 
message. In addition to that frameworks like Spring, Hibernate promote runtime 
errors that makes faultString is kinda useless, or I don't know how to use 
it.... 
 
It looks to me that Adobe needs to reconsider the way they handle the server 
side errors on their side and provide the UI programmers a way to identify the 
error codes on the client side.
 
I'd like to hear flexcoders opinion regarding this or how did they handle this 
in their applications.
 
Thanks,
Valy

----- Original Message ----
From: Tracy Spratt <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, January 15, 2007 1:21:13 PM
Subject: RE: [flexcoders] How to handle server side errors on the UI

I catch all server-side exceptions on the server, and write them into the xml I 
return to the client.  The client resulthandler looks at the xml to determine 
if it is good data or an error and responds appropriately.  For the few 
occasions where the server app itself errors, I use a fault handler.
 
The problem with faultString is that if the server errors with a 500, the 
browser does not pass the full error informtion to the player.  It is possible 
to cause the server to send a 200 instead of a 500, and you can then access the 
fault detail.  How this is done depends on the server.
 
Tracy
 



From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf 
Of Valy Sivec
Sent: Friday, January 12, 2007 3:44 PM
To: [EMAIL PROTECTED] ups.com
Subject: [flexcoders] How to handle server side errors on the UI
 
Hello flexcoders,

I'm working on a project that uses HTTP services and I'm having difficulties 
catching the server side error on the client. In fact, I'd like to be able 
translate the  error code from the back-end to a meaningfull message to the 
client for certain error codes. 

It looks that faultString doesn't help me much. How do you guys deal with the 
server side errors on the client, if you want to have custom error messages 
depending on the error code?

Thanks,
Valy Sivec


 



Any questions? Get answers on any topic at Yahoo! Answers. Try it now.



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

Reply via email to