Skip to content

[ENHANCEMENT] Improved Input Validation and Error Handling - #188

Open
AshubShafqat wants to merge 4 commits into
c2siorg:mainfrom
AshubShafqat:feature/zip-validation-enhancement
Open

[ENHANCEMENT] Improved Input Validation and Error Handling#188
AshubShafqat wants to merge 4 commits into
c2siorg:mainfrom
AshubShafqat:feature/zip-validation-enhancement

Conversation

@AshubShafqat

@AshubShafqat AshubShafqat commented Mar 31, 2026

Copy link
Copy Markdown

Closes #140

🚀 Summary

This PR improves system robustness by enhancing input validation and error handling across the application.

✅ Changes Made

  • Refactored app.py for cleaner structure and added global error handling
  • Added validation for LLM name and keywords in routes
  • Implemented try-catch blocks to prevent runtime crashes
  • Improved error responses with proper status codes
  • Removed unnecessary temporary file

🧪 Testing

  • Tested routes with valid and invalid inputs
  • Verified behavior for missing parameters
  • Ensured no breaking changes in existing functionality

📌 Impact

  • Improves reliability and stability
  • Prevents crashes due to invalid inputs
  • Aligns with best practices for Flask applications

@AshubShafqat

Copy link
Copy Markdown
Author

This PR focuses on improving validation and error handling without affecting existing workflows. Open to feedback and improvements.

@AshubShafqat

Copy link
Copy Markdown
Author

Hi @hardik1408 @nipuna — I've updated this PR to address issue #140
(Lack of input sanitisation on keywords endpoint).

Latest changes now include:

Would really appreciate a review! Happy to make any adjustments.
Also planning to work on the email subscription feature next.

@AshubShafqat

Copy link
Copy Markdown
Author

Note to maintainers: Parts of this PR were developed with
AI assistance (Assisted-By: Claude/AI) as per the
contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lack of input sanitisation on keywords endpoint

1 participant