I have a WCF service for which all operations return an OperationStatus type:
[DataContract] public abstract class ServiceResponse { [DataMember] public bool Success { get; set; } [DataMember] public String StatusReason { get; set; } }
I would like to create an ErrorHandler to catch all the exceptions, and then I would like it to return to the client instance of the ServiceReponse class with the Success property set to false and the StatusReason is "INTERNAL SERROR".
At the moment, I have my own class that implements IErrorHandler, but I do not want to use FaultContract - I just want to return to the regular client client of the StatusReason type. It can be done?
source share