Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[reflex-xy] Expose a typed on_error event and visible failure state

Open
#433 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript, python
Domain
api, frontend

Research direction

Start with python/reflex_xy/assets/XYChart.jsx, especially the static failure paths, socket setup, and onErr handler, then inspect the public prop surface in python/reflex_xy/component.py. Run the existing unit and browser tests before changing behavior; done means static and live failures emit the documented ErrorEvent, recoverable failures retain the last good view, and terminal mount failures show an accessible fallback without duplicate notifications.

Written by the indexing model from the issue text.

Description

Summary

Reflex applications cannot observe chart failures through the component API. Static fetch/decode/render failures and live transport/protocol failures are reduced to console output, while terminal mount failures can leave a blank chart region with no accessible status or retry guidance.

Audited at commit 99eda6d.

Current behavior
  • Static asset failures are caught and only console.warn (XYChart.jsx).
  • Namespace connection errors are debug-only (socket setup).
  • Server err envelopes only warn and optionally resubscribe (onErr).
  • The public Reflex component exposes point, selection, view, animation, and hover handlers but no on_error handler (component.py).

As a result, an application cannot log/measure failures, show its own fallback, distinguish retryable from terminal errors, or test failure behavior without inspecting the browser console.

Proposed direction

Add on_error with an exported versioned ErrorEvent TypedDict. The envelope should include a stable error code, mode/stage, chart identity, recoverability, and a safe message. Keep the last good view during recoverable refresh failures; render an accessible fallback for a terminal initial-mount failure.

Acceptance criteria
  • reflex_xy.chart(..., on_error=...) is a supported, documented component prop.
  • reflex_xy.ErrorEvent exactly describes a versioned runtime envelope with at least code, mode/stage, identity, recoverability, and message.
  • Static HTTP, frame decode, and initial render failures dispatch on_error.
  • Live connection, server err, incompatible protocol/payload, and view-construction failures dispatch on_error.
  • Recoverable refresh failures preserve the last good chart while reporting the error.
  • Terminal initial-mount failures render a concise accessible fallback (for example role="alert") rather than an unexplained blank region.
  • Retry/resync does not flood handlers with duplicate identical errors; recovery can be observed or clears the visible error state.
  • Unit and browser tests cover at least one static and one live failure.
Dominant language
Python
Stars
1.9k
Forks
76
Avg merge
1h 25m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reflex-dev/xy

All issues in reflex-dev/xy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.