Relative Content

Tag Archive for error-handling

How to implement error handling/returning while streaming a message

Say someone calls a web service on a server, the relevant data is being retrieved in batches and the message is being streamed to the client. In the middle of the message some kind of exception is encountered. My current implementation sort of just stops streaming the (in this case soap) message and starts streaming an error message, but obviously the result won’t be a valid message or even valid XML.