removed results loging + added logs for no results returned where missing + improved image fetching
This commit is contained in:
parent
a138928d63
commit
87ac6f05f9
5 changed files with 19 additions and 14 deletions
|
@ -69,5 +69,10 @@ func PerformBraveTextSearch(query, safe, lang string, offset int) ([]TextSearchR
|
|||
|
||||
duration := time.Since(startTime) // Calculate the duration
|
||||
|
||||
// Return an error if no results are found
|
||||
if len(results) == 0 {
|
||||
return nil, duration, fmt.Errorf("no results found")
|
||||
}
|
||||
|
||||
return results, duration, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue