Skip to content

Documented VuMark error codes raise KeyError #3090

Description

@adamtheturtle

Summary

The VuMark Generation API documents these error result codes:

  • QuotaExceeded
  • LicenseCheckFailed
  • AuthorizationFailed

They are not registered in VWSError._exceptions_by_result_code. Both VuMarkService.generate_vumark_instance and AsyncVuMarkService.generate_vumark_instance therefore raise an implementation-detail KeyError when Vuforia returns any of them.

The documented error table is here: https://developer.vuforia.com/library/vuforia-engine/web-api/vumark-generation-web-api/#instance-generation

Reproducer

from vws.exceptions.base_exceptions import VWSError
from vws.response import Response

response = Response(
    text='{"result_code":"LicenseCheckFailed"}',
    url="https://vws.vuforia.com/targets/id/instances",
    status_code=403,
    headers={},
    request_body=b"",
    tell_position=0,
    content=b"",
)

VWSError.from_result_code(
    result_code="LicenseCheckFailed",
    response=response,
)
# KeyError: 'LicenseCheckFailed'

The same happens for QuotaExceeded and AuthorizationFailed, and through both the sync and async VuMark service methods.

Expected behavior

Each documented VuMark failure should raise a stable, public exception that retains the original Response. Tests should exercise the sync and async services for all documented result codes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions