fix typo in error message for invalid shortURL
added check that invalid URLs are caught