Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfriendly exception when providing an incorrect detector ID #161

Open
timmarkhuff opened this issue Feb 5, 2024 · 0 comments
Open

Unfriendly exception when providing an incorrect detector ID #161

timmarkhuff opened this issue Feb 5, 2024 · 0 comments

Comments

@timmarkhuff
Copy link
Contributor

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.

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

No branches or pull requests

1 participant