You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: draft-ietf-httpapi-idempotency-key-header.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,25 +146,25 @@ For each request, server SHOULD
146
146
147
147
## Error Scenarios
148
148
149
-
If the `Idempotency-Key` request header is missing for a documented idempotent operation requiring this header, the resource server MUST reply with an HTTP `400` status code with body containing a link pointing to relevant documentation. Alternately, using the HTTP header `Link`, the client can be informed about the error as shown below.
149
+
If the `Idempotency-Key` request header is missing for a documented idempotent operation requiring this header, the resource server SHOULD reply with an HTTP `400` status code with body containing a link pointing to relevant documentation. Alternately, using the HTTP header `Link`, the client can be informed about the error as shown below.
If there is an attempt to reuse an idempotency key with a different request payload, the resource server MUST reply with a HTTP `422` status code with body containing a link pointing to relevant documentation. The status code `422` is defined in Section 11.2 of {{!RFC4918}}. The server can also inform the client by using the HTTP header `Link` as shown below.
155
+
If there is an attempt to reuse an idempotency key with a different request payload, the resource server SHOULD reply with a HTTP `422` status code with body containing a link pointing to relevant documentation. The status code `422` is defined in Section 11.2 of {{!RFC4918}}. The server can also inform the client by using the HTTP header `Link` as shown below.
If the request is retried, while the original request is still being processed, the resource server MUST reply with an HTTP `409` status code with body containing a link or the HTTP header `Link` pointing to the relevant documentation.
161
+
If the request is retried, while the original request is still being processed, the resource server SHOULD reply with an HTTP `409` status code with body containing a link or the HTTP header `Link` pointing to the relevant documentation.
Error scenarios above describe the status of failed idempotent requests, after the resource server prcocesses them. Clients MUST correct the requests before performing a retry operation, or the the resource server MUST fail the request and return one of the above errors.
167
+
Error scenarios above describe the status of failed idempotent requests after the resource server prcocesses them. Clients MUST correct the requests (with the execption of 409 where no correction is required) before performing a retry operation, or the the resource server MUST fail the request and return one of the above errors.
168
168
169
169
For other 4xx/5xx errors, such as 401, 403, 500, 502, 503, 504, 429, or any other HTTP error code that is not listed here, the client SHOULD act appropriately by following the resource server's documentation.
0 commit comments