buggregator / frontend

Buggregator UI
https://buggregator.dev/
15 stars 8 forks source link

Implement REST API fallback for actions when WebSocket connection fails #43

Closed butschster closed 10 months ago

butschster commented 11 months ago

In certain scenarios, it's observed that Buggregator may fail to connect to the WebSocket (WS) server. While the tool continues to display new events after a page refresh, users are unable to clear these events as all actions are routed through the WebSocket connection. To alleviate this issue, I propose the implementation of a fallback mechanism where actions could be performed via REST API whenever the WebSocket connection is unavailable.

Steps to Reproduce (if necessary):

  1. Disconnect the WebSocket server or simulate a failure in the WebSocket connection.
  2. Attempt to clear events on Buggregator.
  3. Observe that the actions cannot be performed due to the WS connection failure.
  4. Refresh the page to see new events, indicating Buggregator's functionality but the inability to clear events persists.

Expected Behavior:

The actions such as clearing events should still be performable even if the WebSocket connection fails.

Proposed Solution:

Integrate a REST API fallback mechanism within Buggregator to handle actions whenever the WS connection is unavailable. This way, actions like clearing events can be routed through REST API calls, ensuring uninterrupted functionality for users. This fallback mechanism will significantly improve the reliability and user experience of Buggregator, especially in scenarios where WebSocket connections are unstable or unavailable.