I discussed this with an employee, and we could not agree, so I wanted to get your thoughts. I have my own opinions on this, but I will not ruin it.
When should I return a SOAP error and when should I return an object containing error information? Suppose this is for a general web service that can be used by various systems (.NET, Java, independently). The result object has an isError flag, an errorType type (similar to a specific type of exception), and a message.
Some points to consider:
- Is a data validation error an error?
- Should there be a combination of errors (for very exceptional cases) and a result object (for "expected" errors)?
- How would you group SOAP errors (critical [null link] versus validation [wrong postcode])?
- Fail-fast vs must be remembered to check for errors
- Best practices, templates, standards, etc.
Links to articles are valid. Even if it sounds like I want your opinion, please stick to the facts (better x because of y and z ...)
exception-handling web-services soapfault
Nelson Rothermel May 12 '10 at 10:05 p.m. 2010-05-12 22:05
source share