Refactor: in xml_request -> move outer else for predict returning not existing variable msg_result.