Skip to content

error when link already exists

When an URL already exists in the database the app returns an error:

aYourls_error

This is a problem, because I still want the short link, which I do not get when the error pops up.

The error would be perfectly valid, if I were to specify the short URL and that short URL already existed.

However, it makes no sense, when you do not specify the short URL and the long URL already exists in the database. A user still wants to know the short URL of the long URL.