Welcome to MSDN Blogs Sign in | Join | Help

Effective Error Handling with WCF & REST

The post on effective error handling with WCF and REST has been moved to my new blog at www.robbagby.com.

image

Published Thursday, February 19, 2009 3:05 AM by rob.bagby
Filed under: ,

Comments

# Anith » Effective Error Handling with WCF & REST

Wednesday, February 18, 2009 10:33 PM by Anith » Effective Error Handling with WCF & REST

# Demystifying The Code : Effective Error Handling with WCF & REST

Thank you for submitting this cool story - Trackback from DotNetShoutout

Thursday, February 19, 2009 5:07 AM by DotNetShoutout

# #.think.in infoDose #18 (26th Jan - 20th Feb)

#.think.in infoDose #18 (26th Jan - 20th Feb)

Monday, February 23, 2009 12:47 AM by #.think.in

# re: defaults change

Hey bags? how are you?  Nice example.  re: your comment that "defaults change":  I actually think the 500 error is reasonable to return.  If a service throws, then the standard ServiceHost treats it as an exception on the server side.  Totally reasonable for the WebServiceHost2 to do that. The behavior of WebServiceHost seems surprising.

Tuesday, June 09, 2009 12:41 PM by DotNetInterop

# re: Effective Error Handling with WCF & REST

Things are good!  Thanks for asking.

In some cases the 500 is good, in others a 400 is more appropriate.  My example was that someone requested a page with a size of 0 or negative.  That is not really a server error, rather a bad request.  If you were not sure what went wrong in this case and were handed a 500, you might think that the service had an issue, when the issue was with your request.  

The net-net is that either default will be wrong in certain cases.  You need to control it yourself.

Hope all is well with you...

Bags

Tuesday, June 09, 2009 12:48 PM by rob.bagby
Anonymous comments are disabled
 
Page view tracker