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

Allow 202 Accepted response on cancel task #166

Open
markjschreiber opened this issue Oct 14, 2021 · 1 comment
Open

Allow 202 Accepted response on cancel task #166

markjschreiber opened this issue Oct 14, 2021 · 1 comment
Milestone

Comments

@markjschreiber
Copy link

The cancellation of a task might not be synchronous, in some implementations it might be a multi-step operation or a notification sent to a event bus or pub sub queue, and for fast running tasks it may not be processed before the task is complete.

From the RFC

10.2.3 202 Accepted

The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this.

The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent's connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request's current status and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled.

Given that, a 202 response might be more appropriate.

@uniqueg
Copy link
Contributor

uniqueg commented Jun 18, 2024

This was perhaps addressed by returning CANCELLING instead of CANCELLED?

@vsmalladi vsmalladi added this to the Outdated/Completed milestone Oct 31, 2024
@vsmalladi vsmalladi modified the milestones: Outdated/Completed, 2.0, 1.2 Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants