Skip to content

Fix crash when requesting non-existent profile#363

Open
Rhyru9 wants to merge 1 commit intoaws-samples:mainfrom
Rhyru9:fix/keyerror-get-custom-question
Open

Fix crash when requesting non-existent profile#363
Rhyru9 wants to merge 1 commit intoaws-samples:mainfrom
Rhyru9:fix/keyerror-get-custom-question

Conversation

@Rhyru9
Copy link
Copy Markdown

@Rhyru9 Rhyru9 commented Dec 31, 2025

What changed:

  • Added profile validation in get_custom_question endpoint
  • Returns 404 instead of 500 when profile not found
  • Used .get() for safer dictionary access

Testing:

  • Invalid profile returns 404 with clear message
  • Valid profiles work correctly
  • No breaking changes

Issue #: N/A

Added validation to check if profile exists before accessing it.
Now returns 404 instead of crashing with KeyError.
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.

1 participant