lint fix
This commit is contained in:
parent
9e190ac4d9
commit
e19c64e047
@ -587,7 +587,6 @@ func PushHandler(cmd *cobra.Command, args []string) error {
|
|||||||
}
|
}
|
||||||
var ke api.ErrUnknownOllamaKey
|
var ke api.ErrUnknownOllamaKey
|
||||||
if errors.As(err, &ke) && isOllamaHost {
|
if errors.As(err, &ke) && isOllamaHost {
|
||||||
|
|
||||||
// the user has not added their ollama key to ollama.com
|
// the user has not added their ollama key to ollama.com
|
||||||
// return an error with a more user-friendly message
|
// return an error with a more user-friendly message
|
||||||
locals, _ := localPubKeys()
|
locals, _ := localPubKeys()
|
||||||
|
@ -1561,11 +1561,11 @@ func newErr(err error) api.ErrorResponse {
|
|||||||
Message: err.Error(),
|
Message: err.Error(),
|
||||||
}
|
}
|
||||||
// Add additional error specific data, if any
|
// Add additional error specific data, if any
|
||||||
var errResp api.ErrUnknownOllamaKey
|
var keyErr api.ErrUnknownOllamaKey
|
||||||
if errors.As(err, &errResp) {
|
if errors.As(err, &keyErr) {
|
||||||
resp.Code = api.ErrCodeUnknownKey
|
resp.Code = api.ErrCodeUnknownKey
|
||||||
resp.Data = map[string]any{
|
resp.Data = map[string]any{
|
||||||
"key": errResp.Key,
|
"key": keyErr.Key,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resp
|
return resp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user