Describe the bug
This issue was found while testing PR #165, specifically while validating the new bot run deletion flow. As part of the test, the bot run list route and bot run detail route worked as expected, but calling the stats route returned a validation error instead of bot run statistics.
#### curl -sS -u admin:admin 'http://localhost:8000/bot-orchestration/bot-runs/stats' | jq .
{
"detail": [
{
"type": "int_parsing",
"loc": [
"path",
"bot_run_id"
],
"msg": "Input should be a valid integer, unable to parse string as an integer",
"input": "stats"
}
]
}
The request to /bot-orchestration/bot-runs/stats appears to be matched by the dynamic /bot-orchestration/bot-runs/{bot_run_id} route first. Because of that, the API tries to parse stats as an integer bot run ID and returns an integer parsing error. We compared the route order with the main branch and saw the same route ordering there, so this appears to already exist on main. We did not run the route on main yet
Steps to reproduce bug
- Start the API service and authenticate with valid API credentials
- Call GET /bot-orchestration/bot-runs/stats
- Observe that the API returns an integer parsing error for bot_run_id instead of bot run statistics
Describe the bug
This issue was found while testing PR #165, specifically while validating the new bot run deletion flow. As part of the test, the bot run list route and bot run detail route worked as expected, but calling the stats route returned a validation error instead of bot run statistics.
The request to
/bot-orchestration/bot-runs/statsappears to be matched by the dynamic/bot-orchestration/bot-runs/{bot_run_id}route first. Because of that, the API tries to parse stats as an integer bot run ID and returns an integer parsing error. We compared the route order with themainbranch and saw the same route ordering there, so this appears to already exist on main. We did not run the route on main yetSteps to reproduce bug