fix: create missing 500.html error template (#75)#169
Conversation
|
@VyakhyaPathak 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. |
|
@VyakhyaPathak but first resolve the merge conflicts |
|
Hi @komalharshita, Thank you for the review, |
komalharshita
left a comment
There was a problem hiding this comment.
Good contribution overall. The missing 500 error template has been implemented cleanly and the PR stays properly scoped to the issue. The page structure is consistent with the existing UI and reuses shared styling appropriately.
Minor non-blocking suggestion: move the inline button styles into the shared stylesheet for better maintainability in future iterations.
Approved for merge.
|
Thank you for the approval and for merging the PR, @komalharshita! It was great working on this fix. I'll make sure to follow your suggestion about the shared stylesheet in the future. |
Summary [required]
This PR resolves a critical flaw in the server error handling flow by creating the missing
500.htmltemplate. Previously, when an uncaught system exception occurred, Flask's 500 handler crashed while looking for this template, raising a secondaryTemplateNotFoundexception and obscuring the root cause of production failures. Adding this file safely captures unhandled errors and cleanly redirects users back to safety.Related Issue [required]
Closes #75
Type of Change [required]
What Was Changed [required]
templates/500.html404.htmlas requested by the admin.How to Test This PR [required]
git checkout fix/missing-500-error-templatepy -m pip install -r requirements.txtpy tests/test_basic.pyExpected test output:
27 passed, 0 failed out of 27 tests
Test Results [required]
PASS test_projects_json_loads
PASS test_each_project_has_required_fields
PASS test_find_project_by_id_found
PASS test_find_project_by_id_missing
PASS test_parse_skills_basic
PASS test_parse_skills_empty_string
PASS test_parse_skills_single_entry
PASS test_score_single_project_full_match
PASS test_score_single_project_no_match
PASS test_get_recommendations_returns_results
PASS test_get_recommendations_max_three
PASS test_get_recommendations_no_match_returns_empty
PASS test_get_recommendations_result_format
PASS test_validate_all_valid
PASS test_validate_missing_skills
PASS test_validate_missing_level
PASS test_validate_missing_interest
PASS test_validate_missing_time
PASS test_validate_all_missing
PASS test_home_route
PASS test_recommend_api_valid
PASS test_recommend_api_missing_field
PASS test_recommend_api_empty_body
PASS test_project_detail_found
PASS test_project_detail_not_found
PASS test_view_code_found
PASS test_download_code_found
27 passed, 0 failed out of 27 tests
Self-Review Checklist [required]
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
The file utilizes proper 2-space indentation and section comment headers to strictly respect the HTML section design rules mentioned in
CONTRIBUTING.md.