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

Confusing Error Message When Submitting Empty Keyword Field #15

Open harshithtunuguntla opened 4 hours ago

harshithtunuguntla commented 4 hours ago

Description

The application does not differentiate between user-provided keywords and randomly generated keywords during the URL shortening process. If a user submits an empty keyword field, the application generates a random keyword but may still display a message stating that the keyword already exists, leading to confusion for users who think they did not enter any keyword.

Steps to Reproduce

  1. Go to the URL shortening page.
  2. Leave the keyword field empty and provide a long URL.
  3. Submit the form.
  4. Observe that the application generates a random keyword and may display an error stating "The Keyword Already Exists, Choose a Different One," despite the user not entering a keyword.

Expected Behavior

If the user leaves the keyword field empty, the application should generate a unique random keyword and inform the user that the keyword is being generated. If the generated keyword already exists, the application should retry generating a new keyword until a unique one is found or provide a clear message indicating the process.

Actual Behavior

The application generates a random keyword and, if it conflicts with an existing keyword, displays a misleading error message that suggests the user already entered a keyword.

Screenshots

NA

Additional Context

This issue could lead to user frustration and confusion as it is not clear that the application is generating a random keyword in the background. Providing clearer messaging and handling of the empty keyword scenario would enhance user experience and clarity.