Three search parameter forms get an HTTP 500 response or are silently ignored
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start by locating the search parameter parsing and validation code for indexed names, case-insensitive duplicate parameters, and boolean values such as include_granule_counts; the issue does not name files or tests. Reproduce the three examples against the collections and granules search endpoints, then inspect the relevant validation tests. Done when each malformed form returns a 400 naming the parameter, or uppercase TRUE is handled the same as true.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Three search parameter forms get an HTTP 500 response or are silently ignored, where CMR rejects similar forms with a 400 response that names the parameter. The output below is from 2026-12-01.
1. An indexed sort_key is an HTTP 500 response
$ curl -sSg -w ' HTTP %{http_code}\n' 'https://cmr.earthdata.nasa.gov/search/granules.json?short_name=MOD11A2&page_size=0&sort_key[0]=-start_date'
{"errors":["An Internal Error has occurred."]} HTTP 500
Expected: a 400 response that names the parameter, as an indexed short_name gets:
$ curl -sSg -w ' HTTP %{http_code}\n' 'https://cmr.earthdata.nasa.gov/search/granules.json?short_name[0]=MOD11A2&page_size=0'
{"errors":["Parameter [short_name] must have a single value or multiple values."]} HTTP 400
2. A parameter given in both lower case and upper case keeps one value without an error
CMR accepts a parameter name in upper case as well as lower case, and rejects a parameter that takes a single value, such as page_size, when it is given twice. The commands below use a helper that prints the status, then the number of collections or the first error:
search() { curl -sS -w '%{http_code}' "https://cmr.earthdata.nasa.gov/search/collections.json?$1" | jq -rs '"HTTP \(.[1]), " + (.[0].errors[0] // "collections: \(.[0].feed.entry | length)")'; }
$ search 'PAGE_SIZE=2'
HTTP 200, collections: 2
$ search 'page_size=5&page_size=1'
HTTP 400, Parameter [page_size] must have a single value.
Given once in lower case and once in upper case, the parameter keeps one value and drops the other without an error, even when the dropped value is invalid:
$ search 'page_size=5&PAGE_SIZE=1'
HTTP 200, collections: 1
$ search 'PAGE_SIZE=1&page_size=5'
HTTP 200, collections: 5
$ search 'page_size=abc&PAGE_SIZE=1'
HTTP 200, collections: 1
Expected: the same 400 response as for page_size=5&page_size=1.
3. include_granule_counts=TRUE is neither honored nor rejected
include_granule_counts=true adds a granule_count to each collection, and a value such as 1 gets a 400 response. The commands below use a helper that prints the status, then the granule_count of the one collection that matches, or the first error:
counts() { curl -sS -w '%{http_code}' "https://cmr.earthdata.nasa.gov/search/collections.json?short_name=MOD11A2&page_size=1&include_granule_counts=$1" | jq -rs '"HTTP \(.[1]), " + (.[0].errors[0] // "granule_count: \(.[0].feed.entry[0].granule_count)")'; }
$ counts true
HTTP 200, granule_count: 389798
$ counts 1
HTTP 400, Parameter include_granule_counts must take value of true, false, or unset, but was [1]
Given as TRUE or True, the value gets a 200 response without the count:
$ counts TRUE
HTTP 200, granule_count: null
$ counts True
HTTP 200, granule_count: null
Expected: the count, as for true, or the 400 response that 1 gets.
- Lenguaje dominante
- Clojure
- Estrellas
- 403
- Forks
- 113
- Merge medio
- 3 d 2 h
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nasa/Common-Metadata-Repository
-
API docs give the timeout header as CMR-Time-Out, without the "d" in CMR-Timed-OutPosiblemente ocupada @kadnaoui la tomó hace 7 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
nasa/Common-Metadata-Repository#2544 ·
Los mantenedores suelen responder en 1 día
-
Reindexer returns server errors for impossible calendar datesQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nasa/Common-Metadata-Repository#2502 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
nasa/Common-Metadata-Repository#2548 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
nasa/Common-Metadata-Repository#2547 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
nasa/Common-Metadata-Repository#2546 ·
Los mantenedores suelen responder en 1 día
Todos los issues de nasa/Common-Metadata-Repository
Issues similares
-
Build fails with `compile-css`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nextjournal/clerk#830 ·
-
nREPL server never answers a request with non-ASCII text that arrives in more than one chunkAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
IOP tokens release blocker team qa team qa autotests WG adoption
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
penpot/penpot#13540 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100