handle exception when no url is provided