Skip to content

Map the ProjectHasNoApiAccess result code #3128

Description

@adamtheturtle

vws-python maps this result code by the spelling ProjectHasNoAPIAccess:

https://github.com/VWS-Python/vws-python/blob/main/src/vws/exceptions/vws_exceptions.py#L244

Vuforia's result codes table spells it ProjectHasNoApiAccess, with Api rather than API. The ProjectHasNoAPIAccess spelling appears to originate from a hand-written list in vws-python-mock (VWS-Python/vws-python-mock@edd6f91f, 2019) rather than from an observed response, and no real response with either spelling has been found. vws-python-mock is changing to match the documented spelling in VWS-Python/vws-python-mock#3352.

Because VWSError.from_result_code does a plain dict lookup, an unmapped result code raises KeyError rather than a VWSError subclass.

Acceptance criteria

  • ProjectHasNoApiAccess maps to ProjectHasNoAPIAccessError.
  • The casing ambiguity is recorded, given no real response has been observed. Consider keeping the ProjectHasNoAPIAccess key mapped too, so that both spellings raise the same exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions