I know, it’s too late now and we should have created all possible error list before. We couldn’t do this before bcse we were using another API to server our API and that third party API provided us german messages for any error.
Now one of our client has requested to provide them the list of possible error messages for them to handle it accordingly.
Could you please provide me ideal way to document the error lists. I was about to start with an excel spreadsheet but reckon, there should be some better way.
In WCF you should be using a FaultException. Effectively you derive from FaultException and these will be serialized over the wire.
That way your service will correctly pass exceptions down the wire (eg. serialized to SOAP) which your consumers can deal with.
That’s why it’s there. But given you are in production you might not have a choice.