whenever an error happens in the server side, send it to the client