Improved error handling around unique url validation. Fixes #2