You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Endpoint /officers/all on the production database returns 500 #159
Our REST API does a validation check that the values here are invalid, but old entries don't conform to those. It's probably best to remove the validation check and change the model to be a union of the enum types or a string.
Error
Input should be 'president', 'vice-president', 'treasurer', 'director of resources', 'director of events', 'director of educational events', 'assistant director of events', 'director of communications', 'director of multimedia', 'director of archives', 'executive at large', 'first year representative', 'election officer', 'sfss council representative', 'frosh week chair', 'system administrator', 'webmaster' or 'social media manager' [type=enum, input_value='elections officer', input_type=str]
Hi @jbriones1, thanks for looking into this! I see you've self-assigned it just wanted to flag that if you end up not having bandwidth to pick this back up, I'd love to take a crack at it. Looks like a mismatch between the election officer enum value and elections officer being passed in somewhere (possibly a data issue on the prod DB). Happy to help either way let me know if a second pair of hands would be useful too!
Hi @jbriones1, no I'm not I'm a CS (AI & ML) undergrad at Manipal University Jaipur in India, just looking to contribute to open source projects and learn from real-world codebases. Happy to still help out if external contributions are welcome here!
relaxing the model to a string union does kill the 500, but it also makes the bad row invisible. right now the enum error is loud and names the exact value ('elections officer' where the schema wants 'election officer'). loosen it to a string and /officers/all returns 200 with that typo'd role passing straight through, so anything downstream filtering on the enum quietly drops that officer instead of erroring. worth fixing the legacy value in the same pass, otherwise you've traded a crash for a silent miss nobody notices.
Activity
nikitasachan2004 commentedon Aug 6, 2026
Hi @jbriones1, thanks for looking into this! I see you've self-assigned it just wanted to flag that if you end up not having bandwidth to pick this back up, I'd love to take a crack at it. Looks like a mismatch between the election officer enum value and elections officer being passed in somewhere (possibly a data issue on the prod DB). Happy to help either way let me know if a second pair of hands would be useful too!
jbriones1 commentedon Aug 6, 2026
Hi @nikitasachan2004, just checking are you a student at Simon Fraser University?
nikitasachan2004 commentedon Aug 6, 2026
Hi @jbriones1, no I'm not I'm a CS (AI & ML) undergrad at Manipal University Jaipur in India, just looking to contribute to open source projects and learn from real-world codebases. Happy to still help out if external contributions are welcome here!
jbriones1 commentedon Aug 6, 2026
Thank you for the interest, but our organization only accepts contributions from our University students. I'm sorry.
m13v commentedon Aug 28, 2026
relaxing the model to a string union does kill the 500, but it also makes the bad row invisible. right now the enum error is loud and names the exact value ('elections officer' where the schema wants 'election officer'). loosen it to a string and /officers/all returns 200 with that typo'd role passing straight through, so anything downstream filtering on the enum quietly drops that officer instead of erroring. worth fixing the legacy value in the same pass, otherwise you've traded a crash for a silent miss nobody notices.