now client can receive error msg if type invalid request