0 Replies Latest reply on Feb 2, 2007 6:15 AM by daniel jarrett

    user error handling.

    daniel jarrett Newbie

      does anyone have any techniques for handling user errors with webservices?

      for example you have a web service that queries a database for records but no records are found (not a terribly good example, but lets pretend that no records could mean a number of different things)..

      do you use a webservice fault (exception) to say that theres no records because...? or do you have the operation return a "response" type message that contains a nullable object for the records (if there is any) and a list of error messages if there isn't?

      When i started creating webservices in java i would have just thrown a bunch of custom faults for my user error handling.. but faults come back in a soap response with a 500 Internal server error http header and this just doesn't seem right. Plus i've since been programming using VB in dotnet *vomits* and exceptions (which i see faults as) are used a little differently to the way they are in java, moreso for exceptional circumstances rather than handling possible expected outcomes.

      So I'm really just wondering how you guys handle expected user errors/responses? Are there any recommended or standard patterns for ways to handle these circumstances?

      thanks
      d