USACE / USACE/cwms-data-api

[Bug]: The gate change endpoint for POST uses fail-if-exists for override protection

Open Beginner friendly
#1,906 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug priority:medium
Dominant language
Java
Stars
28
Forks
25
Avg merge
4d 22h
Merged PRs (30d)
20

Description

Describe the bug

The query parameter fail-if-exists is mislabeled and is instead used for the override protection flag.

Expected behavior

The query parameter should be override-protection matching the turbine change endpoint.

To Reproduce
  1. Look at the code https://github.com/USACE/cwms-data-api/blob/863215ddbfced770af85682ddda65ad185ff97a3/cwms-data-api/src/main/java/cwms/cda/api/location/kind/GateChangeCreateController.java#L86
Priority

Medium

Logs/Incident Identifier

No response

CURL Commands

CDA Version

2026.08.14-testa

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at cwms-data-api/src/main/java/cwms/cda/api/location/kind/GateChangeCreateController.java around line 86, then compare the parameter naming with the turbine change endpoint. Confirm that the POST gate change endpoint exposes override-protection rather than fail-if-exists, and verify the endpoint's override protection behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.