Bricks: store error responses crash or hide store defects
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
- 85/100
Línea de trabajo
The logic lives in StoreClient.Reason in Gaya/MASS4.Bricks/Registry/StoreClient.cs; read that method and surrounding PackageException handlers. Modify parsing to only take title from JSON object string and make malformed success name host/method/endpoint, then add regression tests for advisory endpoint cases. Done when refused requests yield PackageException with title/status and malformed success stops with endpoint named, suite green.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current State
StoreClient.Reason (Gaya/MASS4.Bricks/Registry/StoreClient.cs) reads title from any refused response with JsonNode.Parse(body)?["title"]. A JSON body that is not an object ([], a string, a number), or a non-string title, throws InvalidOperationException instead of falling back to the status text. That exception escapes every PackageException handler: a 500 from the advisory endpoint aborts brick resolution, and the same path serves brick upload, so a production upload could crash on the store's error instead of reporting it.
A success response with malformed JSON throws a bare JsonException that does not say which store endpoint produced it, so it reads as a resolver bug.
Tasks
- Take the problem
titleonly from a JSON object whosetitleis a string; otherwise report the status - Keep a malformed success loud (never treated as "no advisories" or any other empty answer) and name the host, method and endpoint as a store defect
- Regression tests: non-object error body on the advisory endpoint, malformed advisory success
Acceptance Criteria
- A refused store request always ends in a
PackageExceptioncarrying the store's title or the status - A malformed success stops the operation with a message naming the endpoint
- Full suite green; changed methods meet CRAP ≤ 15
Related
- Found while closing coverage gaps after the store contract client batch (
96a5587) - #321
- Lenguaje dominante
- C#
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 1 h 48 min
- PR fusionados (30 d)
- 40
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 MASS4ORG/Turian
-
c:assets p:low size:XS t:task
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
c:graphics p:medium size:L t:enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 1 día
-
c:engine p:low size:XL t:feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Los mantenedores suelen responder en 1 día
-
c:engine p:medium size:XL t:refactor
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Los mantenedores suelen responder en 1 día
-
c:engine p:medium size:S t:enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
Todos los issues de MASS4ORG/Turian
Issues similares
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dotnet/dotnet-api-docs#13210 ·
Los mantenedores suelen responder en 1 día
-
aspnet-core/svc doc-enhancement mvc/subsvc Pri2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dotnet/AspNetCore.Docs#38016 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
HicServices/RDMP#2398 ·
-
[Android] Memory leak in MAUI Graphics text drawing and measurement during repeated renderingAbiertoarea-drawing platform/android t/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dotnet/maui#39676 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día