mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #20280] [MERGED] fix: add explicit HTTPException for access control failures #41173
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/20280
Author: @Classic298
Created: 12/30/2025
Status: ✅ Merged
Merged: 12/31/2025
Merged by: @tjbck
Base:
dev← Head:fix/issue-009-019-021-implicit-none📝 Commits (1)
4c99aa4fix: add explicit HTTPException for access control failures📊 Changes
4 files changed (+24 additions, -4 deletions)
View changed files
📝
backend/open_webui/routers/knowledge.py(+6 -1)📝
backend/open_webui/routers/models.py(+6 -1)📝
backend/open_webui/routers/prompts.py(+6 -1)📝
backend/open_webui/routers/tools.py(+6 -1)📄 Description
Fix implicit None returns in get_model_by_id, get_knowledge_by_id, get_tools_by_id, and get_prompt_by_command. Now properly returns 401 for access denied and 404 for not found instead of silently returning None.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.