Skip to content

Fix/empty skills validation 1264#1265

Merged
komalharshita merged 4 commits into
komalharshita:mainfrom
nishiagarwal2006-lang:fix/empty-skills-validation-1264
Jul 19, 2026
Merged

Fix/empty skills validation 1264#1265
komalharshita merged 4 commits into
komalharshita:mainfrom
nishiagarwal2006-lang:fix/empty-skills-validation-1264

Conversation

@nishiagarwal2006-lang

Copy link
Copy Markdown
Contributor

Description

Fixed an unhandled TypeError: argument of type 'NoneType' is not iterable that occurred when a user submitted the recommendation form without typing or selecting any skills.

Changes Made

  • Added a structural guard validation step inside the /api/recommend route handler in src/routes/main_routes.py.
  • Checked if the extracted and stripped skills input evaluates to an empty string.
  • Explicitly return an HTTP 400 Bad Request alongside the payload {"error": "Please enter at least one skill to get recommendations."} to bypass downstream crashes in the recommendation algorithm.

Closes #1264

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

@nishiagarwal2006-lang is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working labels Jul 4, 2026
@komalharshita komalharshita added the need review Further information is requested label Jul 17, 2026
@komalharshita

Copy link
Copy Markdown
Owner

@nishiagarwal2006-lang kindly resolve the merge conflicts

@komalharshita

Copy link
Copy Markdown
Owner

Thank you for your contribution to DevPath!

Great work, and I'm happy to approve this PR. Keep contributing! 🚀

@komalharshita
komalharshita merged commit 7fe62cd into komalharshita:main Jul 19, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] /api/recommend endpoint returns HTTP 500 when form is submitted with no skills selected

2 participants