Skip to content

Fix/empty skills validation 1264#1265

Open
nishiagarwal2006-lang wants to merge 3 commits into
komalharshita:mainfrom
nishiagarwal2006-lang:fix/empty-skills-validation-1264
Open

Fix/empty skills validation 1264#1265
nishiagarwal2006-lang wants to merge 3 commits into
komalharshita:mainfrom
nishiagarwal2006-lang:fix/empty-skills-validation-1264

Conversation

@nishiagarwal2006-lang

Copy link
Copy Markdown

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

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

Labels

gssoc-2026 need review Further information is requested type:bug Something isn't working

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