Skip to content

Conversation

@apetenchea
Copy link
Member

@apetenchea apetenchea commented Nov 3, 2025

New API added


Note

Add admin-only AQL.history() for recent query history with tests and bump version to 1.0.3.

  • AQL API:
    • Add AQL.history() to fetch recent AQL queries via GET /_admin/server/aql-queries; returns result payload.
    • Introduce AQLQueryHistoryError for error handling.
  • Tests:
    • Extend tests/test_aql.py to verify history() success (superuser) and failure cases.
  • Version:
    • Bump __version__ to 1.0.3.

Written by Cursor Bugbot for commit b8d38a8. This will update automatically on new commits. Configure here.

@apetenchea apetenchea self-assigned this Nov 3, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"])
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

@apetenchea apetenchea merged commit 414a4de into main Nov 3, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants