AOSSIE-Org / AOSSIE-Org/EduAid
[BUG]: Google Doc error message is treated as quiz input on Text_Input page
- Vorherrschende Sprache
- JavaScript
- Sterne
- 171
- Forks
- 425
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Bug Description
Problem
On the Text_Input page, when a user enters an invalid Google Doc URL, the request to retrieve the document fails and the following message appears in the textarea:
"Error retrieving Google Doc content"
This message is currently stored in the text state. If the user clicks Next afterwards, the app treats this error message as valid input and sends it to the backend to generate a quiz.
Steps to Reproduce
-Open the Text_Input page.
-Enter an invalid Google Doc URL (e.g., random text).
-Wait for the error message to appear.
-Click Next.
Current Behavior
The error message "Error retrieving Google Doc content" is treated as user input and sent to the backend.
Expected Behavior
Error messages should not be stored in the text state or treated as quiz input.
Instead, they should be displayed separately (e.g., using an error state) and the user should be prompted to provide valid input.
Proposed Fix
-Introduce a separate error state (e.g., inputError).
-Display error messages using this state instead of storing them in text.
-Prevent error messages from being sent to the backend.
Benefits
-Prevents invalid backend requests
-Improves error handling
-Provides better user experience
### Steps to Reproduce
_No response_
### Logs and Screenshots
_No response_
### Environment Details
_No response_
### Impact
Critical - Application is unusable
### Code of Conduct
- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.