wrap 'agent not found' exception