[PR #147] [MERGED] Improve CLI error display #10013

Closed
opened 2026-04-12 22:49:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/147
Author: @BruceMacD
Created: 7/20/2023
Status: Merged
Merged: 7/21/2023
Merged by: @BruceMacD

Base: mainHead: brucemacd/cli-err-display


📝 Commits (2)

  • ebaa33a display gin api errors in cli
  • 09dc627 suppress error when running list before pulling image

📊 Changes

3 files changed (+26 additions, -15 deletions)

View changed files

📝 api/client.go (+4 -5)
📝 api/types.go (+17 -10)
📝 server/routes.go (+5 -0)

📄 Description

Fixing a couple of error display issues I ran into while running ollama.

  1. Errors returned using gin in the form {"error": "some message"} were not being displayed in the CLI. Update the format of the stream error object so that it will parse both these gin errors and custom errors.
  2. Do not return a 500 error when running ollama list before pulling any images, return an empty set of images instead.

🔄 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/147 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 7/20/2023 **Status:** ✅ Merged **Merged:** 7/21/2023 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/cli-err-display` --- ### 📝 Commits (2) - [`ebaa33a`](https://github.com/ollama/ollama/commit/ebaa33ac2817e36b37f3c789ee30f4cf9cec957e) display gin api errors in cli - [`09dc627`](https://github.com/ollama/ollama/commit/09dc6273e3404cf6a3dfad3810a081b4226667bb) suppress error when running list before pulling image ### 📊 Changes **3 files changed** (+26 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+4 -5) 📝 `api/types.go` (+17 -10) 📝 `server/routes.go` (+5 -0) </details> ### 📄 Description Fixing a couple of error display issues I ran into while running ollama. 1. Errors returned using gin in the form `{"error": "some message"}` were not being displayed in the CLI. Update the format of the stream error object so that it will parse both these gin errors and custom errors. 2. Do not return a 500 error when running `ollama list` before pulling any images, return an empty set of images instead. --- <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-12 22:49:50 -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#10013