Skip to content

Fix GET /settings/name 500 error#12239

Open
qqmyers wants to merge 1 commit intoIQSS:developfrom
QualitativeDataRepository:Get_settings_fix
Open

Fix GET /settings/name 500 error#12239
qqmyers wants to merge 1 commit intoIQSS:developfrom
QualitativeDataRepository:Get_settings_fix

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Mar 20, 2026

What this PR does / why we need it: It doesn't look like the /api/admin/settings/{name} call was updated correctly when validation was added. This PR catches the correct exception type to return a 400 {"status":"ERROR","message":"The name of the setting is invalid."} response instead of a 500 and a stack trace in the log for a bad setting name.

Which issue(s) this PR closes:

Special notes for your reviewer:
#12077 suggests a larger refactor, but it would be good to have some fix.

Suggestions on how to test this: Call http://localhost:8080/api/admin/settings/badsetting before and after the PR. Note the error fix

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@qqmyers qqmyers added the GDCC: QDR of interest to QDR label Mar 20, 2026
@qqmyers qqmyers added this to the 6.11 milestone Mar 20, 2026
@qqmyers qqmyers added the Type: Bug a defect label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GDCC: QDR of interest to QDR Type: Bug a defect

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

/api/admin/settings/<name> returns 500 error (vs 400) for invalid setting

1 participant