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

Bricks: store error responses crash or hide store defects

Abierto
#322 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
backend

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

c:gaya p:high size:XS t:bug

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 title only from a JSON object whose title is 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 PackageException carrying 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

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.

Más de MASS4ORG/Turian

Todos los issues de MASS4ORG/Turian

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.