removed results loging + added logs for no results returned where missing + improved image fetching

This commit is contained in:
partisan 2024-06-16 00:14:21 +02:00
parent a138928d63
commit 87ac6f05f9
5 changed files with 19 additions and 14 deletions

View file

@ -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
}