harshithtunuguntla / project-osus

HacktoberFest OpenSource URLShortener Application - Participate in Hacktoberfest by contributing to any Open Source project on GitHub! Here is a starter project for first time contributors. #hacktoberfest
https://project-osus.vercel.app
3 stars 7 forks source link

Duplicate Keyword Error Message Shown As HyperLink #11

Open harshithtunuguntla opened 4 hours ago

harshithtunuguntla commented 4 hours ago

Description

When a user attempts to shorten a URL using a keyword that has already been taken, the system redirects the user and displays the message "The Keyword Already Exists, Choose a Different One" as a hyperlink (href). This redirection causes confusion and disrupts the user experience, as the error message should be shown on the same page, allowing users to correct their input without leaving the page.

image

Steps to Reproduce

  1. Go to the URL shortening page.
  2. Enter a keyword that has already been used for another URL.
  3. Click on the "Shorten" button.
  4. The user is redirected, and the error message "The Keyword Already Exists, Choose a Different One" is shown as a hyperlink.

Expected Behavior

If a user enters a keyword that has already been taken:


Actual Behavior


Environment


Additional Context

The issue impacts user experience, as redirection causes unnecessary page loads. Adding validation to show the error message as a popup or inline message would allow users to immediately correct the input without page redirection.