catching error for url call