Conversation
…bleshooting table
|
Hi! Adding a quick note for context: This PR focuses on fixing the 500 Internal Server Error (#447) by handling invalid or missing category input at the backend level. The goal is to prevent crashes and ensure the flow continues with proper warnings. I also noticed there is a frontend validation approach being discussed. I agree that preventing invalid requests at the UI level is valuable, and combining both frontend validation and backend safeguards would make the system more robust. I’ve also resolved the merge conflicts and ensured the changes are cleanly integrated. Happy to make any further improvements if needed. Would really appreciate your feedback! @ayushshukla1807 would like your thoughts on this approach as well! |
|
Please review my comment on #447 - updates in the master have provided new insights into the required scope. Converting back to draft for now. |
#### ## Problem
When creating a round using the category import method, invalid or missing category input caused unhandled exceptions in:
This resulted in a 500 Internal Server Error, breaking the backend flow and preventing further processing like entry handling and disqualification.
Solution
Added proper validation for category input
Ensured
Category:prefix is correctly appliedWrapped category import logic in a
try-exceptblock to handle failures safelyAdded meaningful warning messages instead of allowing crashes
Handled edge cases:
Key Changes
Prevented backend crash by catching exceptions during category import
Ensured
entriesis always defined (empty list fallback)Added user-friendly warnings:
Category is requiredNo images found in this categoryInvalid category or unable to fetch imagesAllowed downstream logic (like disqualification) to execute correctly
Result
Testing
Closes #447