Exceptions and SOA

Arnon posts here Exceptions and SOA that

"...(innerException) the original error" - do not expose internal implementation out side of the service - only what's in the contract - in other words don't, just don't bubble exceptions out of your service.

Well I wonder what the verbiage of the exception should be?  If a null pointer occurred in the service, what message should I return back to the consumer of the service?

Print | posted on Wednesday, February 08, 2006 1:14 PM

Feedback

# re: Exceptions and SOA

left by David Hurtado at 2/21/2006 3:38 AM Gravatar
I think the point is that the consumer does not matter if the error has been a Null Pointer, of Null Reference, or whatever. Since the consumer can be any client, developed in any tecnology, located anywhere in the world (depending on your app domain, of course), the consumer does not care about internals of the service. The consumer acts as a 'user' of the service, so don't give him tech details about the underneath.

# re: Exceptions and SOA

left by Jason Orendorff at 5/16/2006 6:58 AM Gravatar
David: Completely, thoroughly disagree. The assertion that "Users don't care about this information" is just plain wrong. The users of web services are people building applications. In other words, they're technical people. Exceptions speak to them.

Granted, I don't care about the internals of your service. But you're giving me the choice between "Sorry, that didn't work" and "NullPointerException in file com/example/baz/buz/zebox.quxx line 1342". The latter tells me two highly relevant, useful facts:

- It's not my fault.

- You need to be told about it, because it's probably a bug in your software.

And by the way, I can send you an error report that includes the filename and line number of the error.

By contrast "sorry" is just not good enough. I don't know about you, but I hate applications that act that way.
Title  
Name
Email (never displayed)
Url
Comments