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

TFP-5687: Kall til avslutt kobling returnerer 204 om kobling er allerede avsluttet #2644

Merged

Conversation

mrsladek
Copy link
Collaborator

@mrsladek mrsladek commented Mar 11, 2025

ellers ville man fått en exception på dette.

@mrsladek mrsladek requested a review from a team as a code owner March 11, 2025 17:28
@mrsladek mrsladek requested a review from Copilot March 11, 2025 17:28
@github-actions github-actions bot added the web label Mar 11, 2025

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the deactivation endpoint so that it returns a 204 status if the connection is already deactivated, ensuring a safe no-op for redundant deactivation requests.

  • The main service now checks if a connection is active before attempting deactivation.
  • A new test has been added to validate that no deactivation action is taken and 204 is returned when the connection is already deactivated.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
web/src/main/java/no/nav/foreldrepenger/abakus/kobling/KoblingRestTjeneste.java Added an active check to differentiate between active and already deactivated connections.
web/src/test/java/no/nav/foreldrepenger/abakus/kobling/KoblingRestTjenesteTest.java Introduced a test case confirming that the endpoint returns 204 when the connection is already deactivated.
@mrsladek mrsladek requested review from pekern and jolarsen March 11, 2025 17:29
@mrsladek mrsladek merged commit e74b751 into master Mar 11, 2025
12 checks passed
@mrsladek mrsladek deleted the feat/TFP-5687_avslutt_kobling_som_er_inavtiv_allerede branch March 11, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants