Skip to content

Commit

Permalink
format bing explicit error
Browse files Browse the repository at this point in the history
  • Loading branch information
juzeon committed Feb 6, 2024
1 parent fd7547a commit 1af1670
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sydney/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,9 @@ func (o *Sydney) AskStreamRaw(options AskStreamOptions) <-chan RawMessage {
result := gjson.Parse(msg)
if result.Get("type").Int() == 2 && result.Get("item.result.value").String() != "Success" {
msgChan <- RawMessage{
Error: errors.New(result.Get("item.result.value").Raw + ": " +
result.Get("item.result.message").Raw),
Error: errors.New("bing explicit error: value: " +
result.Get("item.result.value").String() + "; message: " +
result.Get("item.result.message").String()),
}
return
}
Expand Down

0 comments on commit 1af1670

Please sign in to comment.