Skip to content

Return 404 instead of 500 for missing reference genome gene#11910

Open
Gautam-aman wants to merge 1 commit intocBioPortal:masterfrom
Gautam-aman:fix-11907-null-guard
Open

Return 404 instead of 500 for missing reference genome gene#11910
Gautam-aman wants to merge 1 commit intocBioPortal:masterfrom
Gautam-aman:fix-11907-null-guard

Conversation

@Gautam-aman
Copy link

@Gautam-aman Gautam-aman commented Jan 8, 2026

Problem

Requesting a reference genome gene that does not exist results in a 500 server error.

Solution

Add explicit null handling in ReferenceGenomeGeneController and return HTTP 404 when the gene is missing.

@Gautam-aman
Copy link
Author

This PR applies a minimal defensive fix to return HTTP 404 instead of 500
when a reference genome gene is missing.

No business logic was changed and no new dependencies were introduced.
Please let me know if you would like me to add a controller test.

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.

2 participants