[PR #8249] [MERGED] fix: raise exceptions properly in process_chat_payload #45241

Closed
opened 2026-04-29 19:35:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/8249
Author: @albinvar
Created: 1/1/2025
Status: Merged
Merged: 1/2/2025
Merged by: @tjbck

Base: devHead: main


📝 Commits (2)

  • 4bc9904 Merge pull request #8159 from open-webui/dev
  • c561eb7 fix: raise exceptions properly in process_chat_payload

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/open_webui/utils/middleware.py (+1 -1)

📄 Description

Changed return to raise to ensure the exception propagates correctly to the caller and triggers proper error handling.

4bc9904b3c/backend/open_webui/utils/middleware.py (L647)

Using raise ensures the exception is thrown upwards, allowing the API handler to catch it and respond with a proper HTTP error code.

Issue Reference #8248


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/8249 **Author:** [@albinvar](https://github.com/albinvar) **Created:** 1/1/2025 **Status:** ✅ Merged **Merged:** 1/2/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (2) - [`4bc9904`](https://github.com/open-webui/open-webui/commit/4bc9904b3cd0726d3f9c3cbaeade972cf167b6c4) Merge pull request #8159 from open-webui/dev - [`c561eb7`](https://github.com/open-webui/open-webui/commit/c561eb7bbd6efcf15b05a3b9cd6aa7ad924019a6) fix: raise exceptions properly in process_chat_payload ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/middleware.py` (+1 -1) </details> ### 📄 Description Changed return to raise to ensure the exception propagates correctly to the caller and triggers proper error handling. https://github.com/open-webui/open-webui/blob/4bc9904b3cd0726d3f9c3cbaeade972cf167b6c4/backend/open_webui/utils/middleware.py#L647 Using raise ensures the exception is thrown upwards, allowing the API handler to catch it and respond with a proper HTTP error code. Issue Reference #8248 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 19:35:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#45241