Skip to content

Unhandled 404 Error when POST timeseries of a Sub Location #1585

@krowvin

Description

@krowvin

@inguyen314 was attempting to POST to a timeseries on CWBI dev and he got a 404, but the error itself was not handled.

Ivan was able to POST the sub location to create it.

This fixed the underlying issue of not being able to POST the timeseries.

Solution

Please add better error handling for writing a TS to a sub location that does not exist

{  "message": "ORA-20998: ERROR: ORA-06512: at \"CWMS_20.CWMS_ERR\", line 80",  "incidentIdentifier": "118aa2e1-3c84-47a5-8de5-f5429b08e355",  "source": "Database",  "details": {}}

This error is not obvious that a location is missing, we caught it when we went in swagger and saw it was a 404. (Had we gone to the network tab in the browser we would have caught the 404 as well)

POST:

curl -X 'POST' \  
'https://water.dev.cwbi.us/cwms-data/timeseries?create-as-lrts=false&store-rule=REPLACE%20ALL&override-protection=false&_cb=1771342147801' \  
-H 'accept: */*' \  -H 'Content-Type: application/json;version=2' \ 
 -H 'Cache-Control: no-cache, no-store, max-age=0' \  
-H 'Pragma: no-cache' \  
-d '{    "name": "Mark Twain Lk-Salt.Flow.Ave.~1Day.1Day.swpa-scheduled-generation",    "office-id": "MVS",    "units": "cfs",    "values": [        [            "2026-02-17T12:00:00.000Z",            0,            0        ]    ]}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:mediumWe care, and will try and get to it soon.

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions