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
|
||||
if errors.As(err, &ke) && isOllamaHost {
|
||||
|
||||
// the user has not added their ollama key to ollama.com
|
||||
// return an error with a more user-friendly message
|
||||
locals, _ := localPubKeys()
|
||||
|
@ -1561,11 +1561,11 @@ func newErr(err error) api.ErrorResponse {
|
||||
Message: err.Error(),
|
||||
}
|
||||
// Add additional error specific data, if any
|
||||
var errResp api.ErrUnknownOllamaKey
|
||||
if errors.As(err, &errResp) {
|
||||
var keyErr api.ErrUnknownOllamaKey
|
||||
if errors.As(err, &keyErr) {
|
||||
resp.Code = api.ErrCodeUnknownKey
|
||||
resp.Data = map[string]any{
|
||||
"key": errResp.Key,
|
||||
"key": keyErr.Key,
|
||||
}
|
||||
}
|
||||
return resp
|
||||
|
Loading…
x
Reference in New Issue
Block a user