[PR #11494] api: handle http reponse statuscode #18826

Open
opened 2026-04-16 06:48:09 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11494
Author: @wenchezhao
Created: 7/22/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (1)

  • 1082639 api: handle http reponse statuscode

📊 Changes

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

View changed files

📝 api/client.go (+7 -0)

📄 Description

Add a check for HTTP status codes >= 400 in the Client.stream method. When such a response is received, return a StatusError containing the status code and status text. This improves error handling for streaming API calls.


🔄 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/ollama/ollama/pull/11494 **Author:** [@wenchezhao](https://github.com/wenchezhao) **Created:** 7/22/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`1082639`](https://github.com/ollama/ollama/commit/1082639cfd23d0a9ae285c4812da53c68d714d60) api: handle http reponse statuscode ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+7 -0) </details> ### 📄 Description Add a check for HTTP status codes >= 400 in the Client.stream method. When such a response is received, return a StatusError containing the status code and status text. This improves error handling for streaming API calls. --- <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-16 06:48:09 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#18826