Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection lost indication for cancelled requests #3279

Open
platosha opened this issue Feb 24, 2025 · 1 comment
Open

Connection lost indication for cancelled requests #3279

platosha opened this issue Feb 24, 2025 · 1 comment
Assignees
Labels
bug Something isn't working hilla Issues related to Hilla

Comments

@platosha
Copy link
Contributor

platosha commented Feb 24, 2025

Describe the bug

After an endpoint request is cancelled programmatically using AbortController.abort(reason), the builtin Vaadin connection indicator erroneously shows ”Connection lost” status.

Note: aborting without a specific reason works correctly.

Expected Behavior

Cancelling an endpoint request manually should not affect the connection indicator status.

Detecting and handling signal.reason should help.

From the loading indicator, an aborted request should be considered finished successfully.

Reproduction

const abortController = new AbortController();
MyService.myEndpoint({signal: abortController.signal});
abortController.abort('no!');

System Info

Vaadin 24.6

@platosha platosha added bug Something isn't working hilla Issues related to Hilla labels Feb 24, 2025
@cromoteca
Copy link
Contributor

I tried to reproduce in both Chrome and Firefox, but unsuccessfully. By the way, AbortController has no cancel method, it's abort. I tried with both an endpoint method that returns immediately and one that takes time so that the cancellation happens.

@platosha platosha self-assigned this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla
Projects
None yet
Development

No branches or pull requests

2 participants