I have read several documentations about building custom ErrorHandler (by inheriting from IErrorHandler). Unfortunately, I have several doubts about how doing it.
The problem is that I don’t exactly understand the meaning of the two methods of IErorrHandler (i.e. ProvideFault and HandleError). For me, the HandleError is used to process asynchronous logic (e.g. login). But, in this case, why does this method return a boolean? I also think that the other method can be used to determine whether an error should be propagated to the client or to something else.
Am I wrong ?
Based on the MSDN documentation, the boolean is to return a success or failure of performing the needed behavior.
You are correct in that the ProviderFault method is where you control what is returned to the client.
I highly recommend reading the linked MSDN doc, it provides some good insight.