return error if type of key is non support