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

Update pact test to reflect that Publishing API publish endpoint is now idempotent #1319

Closed
wants to merge 1 commit into from

Conversation

ryanb-gds
Copy link
Contributor

The Publishing API publish endpoint used to return HTTP 409 Conflict error responses if a publishing app attempted to publish a content item which already had a published edition and no draft edition.

These errors are rarely very useful to the Publishing apps as they are usually caused by a duplicate request due to dependency resolution behaviour or Sidekiq's "at least once" guarantee.

We therefore updated Publishing API to return a 200 OK HTTP response is such cases, as the system is still in a perfectly valid state.

Relevant Publishing API PR: alphagov/publishing-api#3068

…ow idempotent

The Publishing API publish endpoint used to return HTTP 409 Conflict error responses if a publishing app attempted to publish a content item which already had a published edition and no draft edition.

These errors are rarely very useful to the Publishing apps as they are usually caused by a duplicate request due to dependency resolution behaviour or Sidekiq's "at least once" guarantee.

We therefore updated Publishing API to return a 200 OK HTTP response is such cases, as the system is still in a perfectly valid state.
@ryanb-gds
Copy link
Contributor Author

Closing this because the relevant PR to Publishing API was also closed due to being a breaking change to an existing endpoint

@ryanb-gds ryanb-gds closed this Jan 3, 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

Successfully merging this pull request may close these issues.

1 participant