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

[BUG] REST Status code for updating a workflow conflicts with RFC Guidance #552

Closed
dbwiddis opened this issue Mar 6, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Mar 6, 2024

What is the bug?

We currently return 201 (Created) for updating a template. RFC 9110 requires (MUST) either 200 (OK) or 204 (No Content) in this case:

If the target resource does not have a current representation and the PUT successfully creates one, then the origin server MUST inform the user agent by sending a 201 (Created) response. If the target resource does have a current representation and that representation is successfully modified in accordance with the state of the enclosed representation, then the origin server MUST send either a 200 (OK) or a 204 (No Content) response to indicate successful completion of the request.

How can one reproduce the bug?

Update a workflow template.

What is the expected behavior?

Response code of 200 or 204.

Do you have any screenshots?

Screenshot 2024-03-06 at 9 54 01 AM

Do you have any additional context?

OpenSearch's UpdateResponse returns 201 (Created), so we are consistent with them, and they probably shouldn't change to remain compatible. So maybe we should just leave this as-is and close this issue.

@dbwiddis dbwiddis added bug Something isn't working untriaged labels Mar 6, 2024
@minalsha minalsha removed the untriaged label Apr 2, 2024
@joshpalis
Copy link
Member

Closing this issue to remain compatible with OpenSearch update API rest status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants