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

[Feature] Add onAbort interceptor #62

Open
MattCCC opened this issue Sep 22, 2024 · 0 comments
Open

[Feature] Add onAbort interceptor #62

MattCCC opened this issue Sep 22, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@MattCCC
Copy link
Owner

MattCCC commented Sep 22, 2024

The goal is to introduce an onAbort interceptor in the fetchff plugin to handle request abort scenarios. This interceptor will allow developers to define custom logic that executes when a request is aborted (e.g., due to a user action or timeout).

Why?

The fetchff plugin supports request cancellation and timeouts, but there is currently no dedicated hook to handle abort-specific logic. Having an onAbort interceptor will improve flexibility and control, especially in cases where different actions need to be taken based on whether a request was aborted or completed normally.

Expected Behavior:

The onAbort interceptor should trigger when a request is aborted manually and not due to a timeout.

It should receive the request configuration and other relevant details, similar to existing interceptors like onRequest and onResponse.

This will not affect normal cancellation behavior but provide an additional opportunity for handling abort-specific logic.

@MattCCC MattCCC added the enhancement New feature or request label Sep 22, 2024
@MattCCC MattCCC added the good first issue Good for newcomers label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant