[GH-ISSUE #9905] API documentation does not specify how errors are reported #32246

Open
opened 2026-04-22 13:19:52 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @csware on GitHub (Mar 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9905

The API documentation (https://github.com/ollama/ollama/blob/main/docs/api.md) does not specify how errors and especially error messages are reported.

Right now (as of 0.6.2), Ollama seems to use HTTP return codes (such as 404 for missing models, or 400 for broken requests) and returns a JSON object with only a "error" field with an error message.

Originally created by @csware on GitHub (Mar 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9905 The API documentation (https://github.com/ollama/ollama/blob/main/docs/api.md) does not specify how errors and especially error messages are reported. Right now (as of 0.6.2), Ollama seems to use HTTP return codes (such as 404 for missing models, or 400 for broken requests) and returns a JSON object with only a "error" field with an error message.
GiteaMirror added the documentation label 2026-04-22 13:19:52 -05:00
Author
Owner

@mvanhorn commented on GitHub (Mar 9, 2026):

I've submitted a fix in the PR above. Added an Error Responses section to the API docs covering the JSON format and common HTTP status codes.

<!-- gh-comment-id:4024412212 --> @mvanhorn commented on GitHub (Mar 9, 2026): I've submitted a fix in the PR above. Added an Error Responses section to the API docs covering the JSON format and common HTTP status codes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#32246