Skip to content

Map the ProjectHasNoApiAccess result code - #3145

Merged
adamtheturtle merged 4 commits into
mainfrom
adamtheturtle/vws-python-issue-3128
Aug 14, 2026
Merged

Map the ProjectHasNoApiAccess result code#3145
adamtheturtle merged 4 commits into
mainfrom
adamtheturtle/vws-python-issue-3128

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Aug 14, 2026

Copy link
Copy Markdown
Member

Closes #3128.

Vuforia's result codes table spells this result code ProjectHasNoApiAccess, while this package mapped only ProjectHasNoAPIAccess — a spelling which traces back to a hand-written list in vws-python-mock rather than an observed response. No real response with this result code has been found, with either casing.

The exception class name is unchanged.

🤖 Generated with Claude Code


Note

Low Risk
Small registry-key change in exception mapping; only callers depending on the undocumented ProjectHasNoAPIAccess string would see different behavior.

Overview
Aligns VWS result-code handling with Vuforia’s documented spelling ProjectHasNoApiAccess (lowercase “pi” in “Api”). VWSError.from_result_code now maps that string to the existing ProjectHasNoAPIAccessError; the previously mapped ProjectHasNoAPIAccess key is removed because it is not in Vuforia’s table.

The exception class name is unchanged; only the docstring and registry key reflect the documented code. A unit test asserts the documented casing maps correctly, and the vws-python-mock dev dependency is bumped so mock-backed project-state tests use the same spelling.

Reviewed by Cursor Bugbot for commit 9eb5e1c. Bugbot is set up for automated code reviews on this repo. Configure here.

Vuforia's result codes table spells this ``ProjectHasNoApiAccess``, while
this package mapped only ``ProjectHasNoAPIAccess``, a spelling which came
from a hand-written list in ``vws-python-mock`` rather than an observed
response. No real response with either casing has been found, so both
casings now map to ``ProjectHasNoAPIAccessError`` and the ambiguity is
recorded in the code.

``vws-python-mock`` 2026.8.14 changes the mock to the documented
spelling, so the pin is bumped to it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Vuforia does not document the ProjectHasNoAPIAccess casing, so drop it
from the result code map rather than keeping it as an alias.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit deeb0ff. Configure here.

Comment thread src/vws/exceptions/vws_exceptions.py Outdated
"ProjectHasNoAPIAccess": ProjectHasNoAPIAccessError,
# This casing comes from Vuforia's result codes table. No real
# response with this result code has been observed, with this or any
# other casing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Dropped result-code mapping raises KeyError

Medium Severity

Removing the ProjectHasNoAPIAccess mapping means VWSError.from_result_code raises KeyError for a result code this package previously turned into ProjectHasNoAPIAccessError. The PR keeps that spelling mapped because no live Vuforia body has been seen, so either casing can still arrive.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit deeb0ff. Configure here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@adamtheturtle
adamtheturtle merged commit 7bea124 into main Aug 14, 2026
14 checks passed
@adamtheturtle
adamtheturtle deleted the adamtheturtle/vws-python-issue-3128 branch August 14, 2026 11:35
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.

Map the ProjectHasNoApiAccess result code

1 participant