[BUG]: Workflow errors are logged as "Unknown source: No message provided"

Abierto
#187 2 comentarios 0 reacciones 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
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Read backend/app/modules/langgraph_builder.py and the error_handler path, then check backend/tests/test_pipeline.py and the /api/process description in backend/API.md. Reproduce the dropped error details with the supplied failing-node example. Done means the server log names the failing step and message while the API response remains unchanged; the author says a fix and tests are already prepared and plans to open a PR.

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

Descripción

Description

When a step of the LangGraph workflow fails, the server log does not say which step failed or why. Every failure is logged as:

Error detected from 'Unknown source': No message provided

Each node returns {"status": "error", "error_from": ..., "message": ...} when it fails, and error_handler logs error_from and message. But MyState in backend/app/modules/langgraph_builder.py has no error_from or message keys, and LangGraph drops keys that are not in the state schema. So error_handler never sees them and falls back to its defaults.

backend/API.md says for /api/process: "The failing step and its message are written to the server log only, not to the response." The response part holds, but the log part does not. The comment in test_workflow_stops_at_the_first_failing_step (backend/tests/test_pipeline.py) also notes that these keys are dropped.

Steps to reproduce

Make any node fail, for example /api/process with a Groq call that errors, or this in the backend test setup:

from app.modules import langgraph_builder
from app.modules.langgraph_nodes import sentiment

sentiment.run_sentiment_sdk = lambda state: {
    "status": "error", "error_from": "sentiment_analysis", "message": "Groq timed out"
}
langgraph_builder.build_langgraph().invoke({"cleaned_text": "Article text."})

The log shows Error detected from 'Unknown source': No message provided instead of Error detected from 'sentiment_analysis': Groq timed out.

Expected

The log names the failing step and its message, as API.md describes, and the response stays the same (no error_from or message in it).

I have a fix with tests ready and will open a PR.

Lenguaje dominante
TypeScript
Estrellas
58
Forks
90
Merge medio
11 h 51 min
PR fusionados (30 d)
3

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 AOSSIE-Org/Perspective

Todos los issues de AOSSIE-Org/Perspective

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.