Patrick Devine
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
0 deletions
-
cmd/cmd.go
|
|
|
@ -1137,6 +1137,14 @@ func chat(cmd *cobra.Command, opts runOptions) (*api.Message, error) { |
|
|
|
if errors.Is(err, context.Canceled) { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
|
|
|
|
// this error should ideally be wrapped properly by the client
|
|
|
|
if strings.Contains(err.Error(), "upstream error") { |
|
|
|
p.StopAndClear() |
|
|
|
fmt.Println("An error occurred while processing your message. Please try again.") |
|
|
|
fmt.Println() |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
|
|
|
|
|