From 9bb5e3ee6929511d51bed32d7357c80db6cba0cd Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Thu, 20 Feb 2025 10:52:00 -0800 Subject: [PATCH] Update api/types.go Co-authored-by: Michael Yang --- api/types.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/types.go b/api/types.go index f8fa481f3..89566b908 100644 --- a/api/types.go +++ b/api/types.go @@ -642,8 +642,11 @@ func (d *Duration) UnmarshalJSON(b []byte) (err error) { // ErrorResponse implements a structured error interface that is returned from the Ollama server type ErrorResponse struct { - Err string `json:"error,omitempty"` // The annotated error from the server, helps with debugging the code-path - Hint string `json:"hint,omitempty"` // A user-friendly message about what went wrong, with suggested troubleshooting + // Err is the error from the server. It helps with debugging the code-path + Err string `json:"error"` + + // Hint is a user-friendly message about what went wrong, with suggested troubleshooting + Hint string `json:"hint"` } func (e ErrorResponse) Error() string {