fix(cron-alert): resumir páginas HTML de error en los avisos de Telegram - #106
Merged
Merged
Conversation
Cuando Supabase/Cloudflare devuelve un 5xx/525 como página HTML en vez de
JSON (ej. "525: SSL handshake failed"), el alert de cron volcaba todo el
`<!DOCTYPE html> ie6 oldie …` y el motivo real quedaba enterrado e ilegible.
`summarizeErrorText` detecta el HTML, preserva el prefijo útil (ej.
"property_devices read failed:") y extrae el motivo del <title>
("supabase.co | 525: SSL handshake failed") → una sola línea legible. Se
aplica en las dos vías del wrapper (throw + respuesta 5xx). Los errores
que no son HTML pasan intactos.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXHQeq3LpQiRp2zmvXghf2
wikichaves
enabled auto-merge (squash)
July 24, 2026 14:53
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué se hizo
Cuando Supabase/Cloudflare tiene un blip y devuelve un 5xx/525 como página HTML (en vez de JSON), el alert de cron por Telegram volcaba todo el
<!DOCTYPE html> ie6 oldie …de Cloudflare y el motivo real quedaba enterrado e ilegible (ver caso real:525: SSL handshake failed).Fix:
summarizeErrorText()detecta el HTML, preserva el prefijo útil (ej.property_devices read failed:) y extrae el motivo del<title>→ una sola línea legible. Se aplica en las dos vías dewithCronAlerts(throw + respuesta 5xx). Los errores que no son HTML pasan intactos.Antes:
Después:
No toca la lógica de ningún cron — solo el formato del aviso.
Validación
npm run lint✓ ·npx tsc --noEmit✓ ·npm run build✓🤖 Generated with Claude Code
Generated by Claude Code