File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
acceptance/bundle/resources/alerts/basic Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ Deleting files...
6262Destroy complete!
6363
6464>>> [CLI] alerts-v2 get-alert [ALERT_ID]
65- Error: Node with resource name None does not exist.
65+ Error: Alert with ID '[ALERT_ID]' does not exist.
6666
6767Exit code: 1
6868
Original file line number Diff line number Diff line change @@ -543,12 +543,13 @@ func AddDefaultHandlers(server *Server) {
543543 server .Handle ("GET" , "/api/2.0/alerts/{id}" , func (req Request ) any {
544544 defer req .Workspace .LockUnlock ()()
545545
546- value , ok := req .Workspace .Alerts [req .Vars ["id" ]]
546+ id := req .Vars ["id" ]
547+
548+ value , ok := req .Workspace .Alerts [id ]
547549 if ! ok || value .LifecycleState == sql .AlertLifecycleStateDeleted {
548550 return Response {
549551 StatusCode : 404 ,
550- // Backend returns a terrible error message today.
551- Body : map [string ]string {"message" : "Node with resource name None does not exist." },
552+ Body : map [string ]string {"message" : "Alert with ID '" + id + "' does not exist." },
552553 }
553554 }
554555
You can’t perform that action at this time.
0 commit comments