[PR #20257] [MERGED] fix: prevent crash when invalid OpenAPI spec is loaded for tool servers #64378

Closed
opened 2026-05-06 09:55:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20257
Author: @Classic298
Created: 12/30/2025
Status: Merged
Merged: 12/30/2025
Merged by: @tjbck

Base: devHead: mcp


📝 Commits (2)

📊 Changes

2 files changed (+20 additions, -8 deletions)

View changed files

📝 src/lib/apis/index.ts (+8 -1)
📝 src/lib/utils/index.ts (+12 -7)

📄 Description

Description:
Adds defensive checks to prevent the frontend from crashing when an invalid or non-OpenAPI spec is configured for External Tool connections.
Changes:

  • Guard against undefined paths in convertOpenApiToToolPayload to prevent Object.entries crash
  • Detect MCP-style configs used for OpenAPI connections and return a helpful error message instead of breaking the UI
    This fixes the infinite loading screen that occurred when users accidentally configured an MCP server using the OpenAPI connection type.
    Fixes [PR #198] [MERGED] fix: build error temp fix (#20207)

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.

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 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/20257 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 12/30/2025 **Status:** ✅ Merged **Merged:** 12/30/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `mcp` --- ### 📝 Commits (2) - [`c1d1be5`](https://github.com/open-webui/open-webui/commit/c1d1be522340c7fc8acd0593a036cda08eb54531) enh - [`1fc1727`](https://github.com/open-webui/open-webui/commit/1fc1727d437c9d60bcfe3f6a77f4fe4df8014414) fix ### 📊 Changes **2 files changed** (+20 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/apis/index.ts` (+8 -1) 📝 `src/lib/utils/index.ts` (+12 -7) </details> ### 📄 Description Description: Adds defensive checks to prevent the frontend from crashing when an invalid or non-OpenAPI spec is configured for External Tool connections. Changes: - Guard against undefined paths in convertOpenApiToToolPayload to prevent Object.entries crash - Detect MCP-style configs used for OpenAPI connections and return a helpful error message instead of breaking the UI This fixes the infinite loading screen that occurred when users accidentally configured an MCP server using the OpenAPI connection type. Fixes #20207 ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <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-05-06 09:55:38 -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#64378