Conversation
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| if not resp.is_success: | ||
| raise AQLQueryHistoryError(resp, request) | ||
| result: Json = self.deserializer.loads(resp.raw_body) | ||
| return cast(Json, result["result"]) |
There was a problem hiding this comment.
Bug: Inconsistent KeyError in History API Handling
The history() method uses direct dictionary access result["result"] which will raise a KeyError if the "result" key is missing from the API response. This is inconsistent with the safer pattern used in the functions() method (line 701) which uses .get("result") with a None check. If the API response doesn't contain a "result" key, a KeyError will be raised instead of the more appropriate AQLQueryHistoryError, making error handling less predictable.
New API added
Note
Add admin-only
AQL.history()for recent query history with tests and bump version to 1.0.3.AQL.history()to fetch recent AQL queries viaGET /_admin/server/aql-queries; returnsresultpayload.AQLQueryHistoryErrorfor error handling.tests/test_aql.pyto verifyhistory()success (superuser) and failure cases.__version__to1.0.3.Written by Cursor Bugbot for commit b8d38a8. This will update automatically on new commits. Configure here.