Invalid custom filter regex becomes HTTP 500 instead of a query error

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

Los mantenedores suelen responder en 1 día

@TimeToBuildBob ya está trabajando en esto.

Desde el 28/10/2026.

  • #193 de @TimeToBuildBob — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
flask, python
Área
api, backend

Línea de trabajo

Start at the query-function boundary for filter_keyvals_regex and trace how regex compilation errors become query errors; the issue names the offline Flask query route as the integration point. Check existing QueryFunctionException and QueryExecutionError handling, then review regression coverage for empty and populated input, valid matching and nonmatching patterns, and the HTTP route. Done means malformed patterns return HTTP 400 with a useful diagnostic while valid matching and the stated TypeError behavior remain intact.

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

Descripción

Reproduced on current master c7821899ab38c1a39c87d7bf011c22a78de9b205 with the real offline Flask query route (aw-server 994ea988, MemoryStorage, query cache disabled): RETURN = filter_keyvals_regex([], "title", "["); returns HTTP 500 with an uncaught regex compilation error. A valid regex returns HTTP 200.

Expected: malformed custom AQL filter patterns raise the existing QueryFunctionException/QueryExecutionError hierarchy and return HTTP 400 with a useful diagnostic. This is separate from category-rule invalid-regex handling fixed in ActivityWatch/aw-core#176.

Scope: translate regex compilation errors at the query-function boundary only; preserve the low-level transform contract, valid matching, and event-data TypeError behavior. Regression coverage should include empty/populated input, valid matching/nonmatching patterns, and the actual offline HTTP route. I am preparing the scoped repair.

Lenguaje dominante
Python
Estrellas
65
Forks
74
Merge medio
2 d 8 h
PR fusionados (30 d)
6

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 ActivityWatch/aw-core

Todos los issues de ActivityWatch/aw-core

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.