I used the following code to create the client. However, when an error occurs on the server, the error message is still printed directly to the conoele and is not captured b