better assert that ex or ex.cause is ClientException.