My understanding was that this is straight forward, but it isn't so. I have try/catch where in the cach block I have "return "Connection Unsuccessful " + ex.Message;". In the web.config the custom error block looks like this:
<customErrors mode="Go to the complete details ...