Simple error handler added for invalid URLs.