Skip to content

Handle stray BadQueryErrors (#249)#252

Merged
BigSpaceships merged 1 commit intoComputerScienceHouse:developfrom
NinjaCheetah:develop
Feb 4, 2026
Merged

Handle stray BadQueryErrors (#249)#252
BigSpaceships merged 1 commit intoComputerScienceHouse:developfrom
NinjaCheetah:develop

Conversation

@NinjaCheetah
Copy link
Contributor

@NinjaCheetah NinjaCheetah commented Feb 2, 2026

ldap_get_member() returns a BadQueryError whenever getting a user's information fails, and currently this goes uncaught in the /user/<uid> and /image/<uid>. Flask already handles an uncaught BadQueryError by presenting a 404 page, but the exception is still throw out into the console.

This PR just makes it so those endpoints will catch a BadQueryError and return the 404 page directly, rather than letting it go uncaught and having it fall back onto Flask to handle it. (Fix for #249)

Copy link
Contributor

@BigSpaceships BigSpaceships left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 It doesn't give ugly stack trace for me :)

@BigSpaceships BigSpaceships merged commit 787c79e into ComputerScienceHouse:develop Feb 4, 2026
1 check passed
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