[MOBY-dev] how to handle errors in a biomoby service?

Martin Senger senger at ebi.ac.uk
Wed Aug 24 07:43:55 UTC 2005


Dear all,
   I am late with handling this email but it does not mean that I
under-estimate the importance of th topic. It's actually crucial for
claiming that we have a robust and interoperable technology.
   But we need it fast. I mean A decision should be made soon. i
completely agree with Oswaldo that waiting for such important topic for
several years now is a bit unfortunate. So let's face the problem...

   I read Oswaldo's proposal and I had opportunity to discuss it
personaly. But actually I do not have a strong opinion HOW to handle
errors if we handle them SOON.
   One missing piece (IMHO) there is not using the standard way for error
handling in web services. I suspect that i know why it is not there -
because there is not clear solution that would guarantee to work
everywhere (now I am quoting the documenattion for the latest Apache
Axis). However, I have tried it, and it works fine between perl and java
(from both sides). So I think it is worth to use it.
   So now is my summary (and perhaps suggestion):

   1) Critical errors. A service should raise an exception. So this level
does not return any Moby specific data - everything is handled on SOAP
level (sending back faultCode, faultString and such usuaal tags). In Java
it is easy, in Perl as well (use SOAP::Fault).
   This does not bring any additional complexity to the client code -
unless a client is badly written. What I want to say is that a good client
even now should be prepared for transport exception (when a service is
down completely, for example). So catching also a SOAP error produced by a
service is trivial addition.
   To improve interoperability here, we should discuss the error strings
etc. But there were suggestion in Osvaldo's proposal we can follow. The
critical is a decision that we allow services to raise an exception in a
critical situation.

   2) "Your data are wrong" is the next level of errors. For this, both
Oswaldo's sollution would work. As I said, I can go both ways IF we define
what is an empty response. Does it mean an empty tag mobyData or an empty
Object, or Simple... If we come to the end, what does an empty Integer
mean? Does it mean always an error? Because an empry String can be a valid
answer but empty Integer probably not.
   So the problems here are not that much where to put error strings
(service notes or inside simples) but what "empty" means.

   3) And we can talk about the third level - if we distinguish that
sometimes simply your data are wrong and I cannot return you anything
(above), or your data are partially wrong and I can retunr you at least
something. but again, Oswaldo explained it already.

   So what should I put into my services? Please, Mark, tell us...

   Cheers,
   Martin

-- 
Martin Senger
   email: martin.senger at gmail.com
   skype: martinsenger
International Rice Research Institute
Biometrics and Bioinformatics Unit
DAPO BOX 7777, Metro Manila
Philippines, phone: +63-2-580-5600 (ext.2324)




More information about the MOBY-dev mailing list