[PR #2183] [MERGED] feat: better handle openai errors, add error message to message #20920

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

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/2183
Author: @cheahjs
Created: 5/11/2024
Status: Merged
Merged: 5/13/2024
Merged by: @tjbck

Base: devHead: fix/streaming-error


📝 Commits (1)

  • 3113825 feat: better handle openai errors, add error message to message

📊 Changes

3 files changed (+320 additions, -278 deletions)

View changed files

📝 src/lib/apis/streaming/index.ts (+7 -0)
📝 src/routes/(app)/+page.svelte (+157 -139)
📝 src/routes/(app)/c/[id]/+page.svelte (+156 -139)

📄 Description

Pull Request Checklist

  • Target branch: Pull requests should target the dev branch.
  • Description: Briefly describe the changes in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests for the changes?
  • Code Review: Have you self-reviewed your code and addressed any coding standard issues?

Description

  1. Extract error fields from SSE messages if they are present
  2. Add the error message to the chat instead of only having it in the toast:
    image
    image

Changelog Entry

Fixed

  • OpenAI Error Handling: Improved handling of OpenAI errors, providing more informative error messages within the chat interface.

🔄 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/2183 **Author:** [@cheahjs](https://github.com/cheahjs) **Created:** 5/11/2024 **Status:** ✅ Merged **Merged:** 5/13/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix/streaming-error` --- ### 📝 Commits (1) - [`3113825`](https://github.com/open-webui/open-webui/commit/311382589568dc3d504095ec8c69086590a9fab0) feat: better handle openai errors, add error message to message ### 📊 Changes **3 files changed** (+320 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/apis/streaming/index.ts` (+7 -0) 📝 `src/routes/(app)/+page.svelte` (+157 -139) 📝 `src/routes/(app)/c/[id]/+page.svelte` (+156 -139) </details> ### 📄 Description ## Pull Request Checklist - [x] **Target branch:** Pull requests should target the `dev` branch. - [x] **Description:** Briefly describe the changes in this pull request. - [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [x] **Testing:** Have you written and run sufficient tests for the changes? - [ ] **Code Review:** Have you self-reviewed your code and addressed any coding standard issues? --- ## Description 1. Extract `error` fields from SSE messages if they are present 2. Add the error message to the chat instead of only having it in the toast: ![image](https://github.com/open-webui/open-webui/assets/818368/60a61557-6203-44db-8d96-6ba70ad005bf) ![image](https://github.com/open-webui/open-webui/assets/818368/d3f513aa-7693-4ba1-b47d-437ff6b35278) --- ### Changelog Entry ### Fixed - **OpenAI Error Handling**: Improved handling of OpenAI errors, providing more informative error messages within the chat interface. --- <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-20 03:15:29 -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#20920