Skip to content

Unfriendly exception when providing an incorrect detector ID #161

@timmarkhuff

Description

@timmarkhuff

When I provide an incorrect detector_id, I get an unfriendly error message. For example gl.get_detector('some_incorrect_id') raises:

NotFoundException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Date': 'Sat, 03 Feb 2024 22:53:38 GMT', 'Content-Type': 'application/json', 'Content-Length': '23', 'Connection': 'keep-alive', 'Server': 'nginx/1.21.1', 'Vary': 'Accept, Origin, Cookie', 'Allow': 'GET, HEAD, OPTIONS', 'X-Frame-Options': 'DENY', 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'same-origin', 'Cross-Origin-Opener-Policy': 'same-origin', 'X-Request-Id-Resolved': 'req_uu13bb9a40295b46cab2d63d701e2120f5', 'Set-Cookie': 'sessionid=mfa7juxz5wmcq9prqjg4a32ofmd85plh; expires=Sat, 17 Feb 2024 22:53:38 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax'})
HTTP response body: {"detail":"Not found."} 

The same thing happens with gl.submit_image_query if you provide an incorrect detector ID.

We should raise a more friendly exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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