logs better error message when actual action does not match the expected action