Aborted requests not detected by linked web app API
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
We have a SPA with request cancellation implemented using AbortSignal API for certain long running requests. When using a .NET web app as API for SWA, we've noticed that the cancellation is not detected by the API and therefore not cancelled.
**To Reproduce**
1. Deploy a small web frontend app with a request that is cancellable.
2. Deploy a backend service that can handle the cancellation (eg using .NET CancellationToken), stops a long running process, and returns eg HTTP Status 499 when cancelled and logs the response.
3. Trigger and cancel the request from the frontend.
4. The backend will complete the long running request with a 200 OK and not 499. Subsequent requests will potentially be waiting for this to complete.
**Expected behavior**
We expect the API request to be cancelled so that the long running process is aborted when the request is cancelled from the frontend application.
**Additional context**
We suspect that there maybe is something in the way SWAs are set up to communicate with the linked API that keeps the backend from detecting the aborted request. We see the same behaviour when there is a proxy between the frontend and the backend.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.