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

updated exception for get_data_row_by_global_keys #1466

Conversation

Gabefire
Copy link
Collaborator

@Gabefire Gabefire commented Mar 8, 2024

Saw this issue #1260 . I checked this method the res it gives is only {'status': 'FAILURE', 'results': [''], 'errors': [{'global_key': 't', 'error': 'Data Row not found'}]} . No matter if I have invalid characters or not meeting requirements from our docs: https://docs.labelbox.com/reference/data-row-global-keys#requirements. So I just switched it over to ResoruceNotFoundException I wrote a regex that would work to validate ^[^\s][a-zA-Z0-9!_.*'&$@=;\/:+ ]{1,200}[^\s]$ that could be used to throw the MalformedQueryException SDK side. I don't have that regex added to the PR yet since i would have to import re and want an opinion on that

@Gabefire Gabefire requested a review from a team as a code owner March 8, 2024 20:13
@Gabefire Gabefire linked an issue Mar 8, 2024 that may be closed by this pull request
@manuaero manuaero merged commit 5004673 into develop Mar 10, 2024
6 of 10 checks passed
@manuaero manuaero deleted the 1260-clientget_data_row_by_global_key-throws-wrong-exception-on-not-found branch March 10, 2024 19:20
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.

Client.get_data_row_by_global_key throws wrong exception on not found
3 participants