catch invalid URL link exception properly