USACE / USACE/cwms-data-api

[Bug]: /ratings/{rating-id} throws error code 500 when that rating spec is not found

Open
#1,854 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 /ratings/{rating-id} endpoint returns error code 500 where the /ratings/spec/{rating-id} for the same id throws an error code 404.

Expected behavior

Consistency between endpoints so that calling applications can respond accordingly.

To Reproduce

Returns 404:

curl -X 'GET' \
  'https://cwms-data-test.cwbi.us/cwms-data/ratings/spec/EUFA.Stage%3BFlow.Standard.Production?office=SWT' \
  -H 'accept: application/json;version=2' \
  -H 'Cache-Control: no-cache, no-store, max-age=0' \
  -H 'Pragma: no-cache'

Returns 500:

curl -X 'GET' \
  'https://cwms-data-test.cwbi.us/cwms-data/ratings/EUFA.Stage%3BFlow.Standard.Production?office=SWT' \
  -H 'accept: application/json;version=2' \
  -H 'Cache-Control: no-cache, no-store, max-age=0' \
  -H 'Pragma: no-cache'
Priority

Medium

Logs/Incident Identifier
{
  "message": "Failed to process request to retrieve RatingSet",
  "incidentIdentifier": "e3faf90a-33e2-47a7-b1cf-a914c5b3f79d",
  "source": "Unknown",
  "details": {}
}
CURL Commands

CDA Version

CWBI Test - 2026.05.12-testf

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 by running the two documented curl requests against the ratings endpoints and compare their responses for the missing rating ID. Trace the /ratings/{rating-id} entry point to where the RatingSet retrieval error is converted into an HTTP response. Done means the missing rating returns 404 consistently with /ratings/spec/{rating-id}, with the relevant API tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.