Skip to content

Clarify "resource server SHOULD respond with the result of the previously completed operation" #48

@darrelmiller

Description

@darrelmiller

[Without chair hat]

The current draft contains the following text:

Duplicate request (idempotency key and fingerprint has been seen)

Retry

The request was retried after the original request completed. The resource server SHOULD respond with the result of the previously completed operation, success or an error. See Error Scenarios for details on errors.

https://ietf-wg-httpapi.github.io/idempotency/draft-ietf-httpapi-idempotency-key-header.html#section-2.6

Concerns were raised about the ambiguity of this text #31 (comment)

If we can accept the premise that the goal of the idempotency key is to enable POST and PATCH to be idempotent as defined by RFC9110 https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.2 like PUT/DELETE, then we can use the behaviour of those existing idempotent methods to guide us in defining the correct behaviour for idempotent POST/PATCH.

If a PUT request fails with a transient error such as 503/504, then a subsequent request has no expectation of always receiving the same response. Even a successful DELETE that gets a 204, has no expectation of another 204 on the second request. It will commonly return a 404.

Let me propose alternate text for consideration

The request was retried after the original request completed. The resource server SHOULD respond with a response consistent with the request being completed according to the user's intent. See Error Scenarios for details on errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Seeking Feedback

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions