Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Do not raise error for search archive results

Abierto
#17 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
ruby
Área
api

Línea de trabajo

Start in lib/serpapi/client.rb, especially the get handling around lines 154 and 236. Trace how archive search responses with HTTP 200 and a top-level "error" key are processed, then verify that failed searches can be retrieved without raising an error condition.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

If the HTTP response code is 200, we should not raise an error condition. In practice, trying to investigate a set of failed searches is impossible with the client as it currently works. Consider the following:

Processing IDs from failed-searches.txt...
--------------------------------------------------------------------------------
Search ID                      | Created At                | Processed At              | Time Taken
--------------------------------------------------------------------------------
6935c0b9a0cb1015d74ef919: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c0b9a0cb1015d74ef919.json
6935c10c6372f3288d198835: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c10c6372f3288d198835.json
6935c140d1a72b12298a4c3a: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c140d1a72b12298a4c3a.json
6935c1847dcfbe884d95f202: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c1847dcfbe884d95f202.json
6935c23c0fa72e068915493a: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c23c0fa72e068915493a.json
6935c26f80c963a0739496b7: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c26f80c963a0739496b7.json
6935c2a2d99612e9a0b828b2: Error - HTTP request failed with status: 200 OK error: Google hasn't returned any results for this query. from url: https://serpapi.com/searches/6935c2a2d99612e9a0b828b2.json

The search exists, the response was successful, but because of the search api using the same get machinery:

https://github.com/serpapi/serpapi-ruby/blob/024b9ebe3320704a117d46043a49238c8dc14ddc/lib/serpapi/client.rb#L154

It uses the same handling of the presence of a top level "error" key:

https://github.com/serpapi/serpapi-ruby/blob/024b9ebe3320704a117d46043a49238c8dc14ddc/lib/serpapi/client.rb#L236

Instead, we should allow retrieval of failed searches from the archive without raising an error.

Lenguaje dominante
Ruby
Estrellas
35
Forks
20
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.