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

[IDEMPOTENCY] Restore section about stale success responses. #78

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

rofrankel
Copy link
Collaborator

No description provided.

@rofrankel rofrankel requested a review from a team as a code owner December 20, 2023 19:59
Base automatically changed from idempotency to main December 20, 2023 19:59
Comment on lines +97 to +99
In this situation, the method **may** return the current state of the resource
instead. In other words, it is permissible to substitute the historical success
response with a similar response that reflects more current data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying from #77 (comment) :

This behavior seems problematic, because such a response does not actually correlate with the request! What if the resource has subsequently been deleted, or made inaccessible? And even if the common case, how is a client to detect that they have received such a response?

Rather than silently replacing the no longer available appropriate response, I think it would be best to communicate that information. In HTTP terms, it would presumably be a 303 See Other response with a Location field identifying the URL to use for getting current state. And having provided that signal, it would then be possible as an optimization to also include that representation along with a Content-Location field, e.g.

HTTP/1.1 303 See Other
…
Location: /path/to/resource
Content-Location: /path/to/resource

<current representation>


## Changelog

- **2023-23-20**: Adopt AEP from from Google's AIP with the following changes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid date, presumably you want this?

Suggested change
- **2023-23-20**: Adopt AEP from from Google's AIP with the following changes:
- **2023-12-20**: Adopt AEP from from Google's AIP with the following changes:

Copy link
Contributor

@mkistler mkistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear what this PR is for given that #77 was merged. Can we close it?

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

Successfully merging this pull request may close these issues.

None yet

3 participants