Open logan-hcg opened 9 months ago
Hi @logan-hcg, thank you for reporting!
You're seeing this exception because the repository name is invalid (contains <>
) and not because it does not exist.
If you try instead with this code, you'll get False
back:
lakefs.Repository("not-real").branch("branch-name").object("something").exists()
However, there's still room for improvement in the error message: If you run the following code:
lakefs.Repository("<invalid-name>").metadata
You get this error message, which contains an informative message in the response body:
lakefs.exceptions.BadRequestException: code: 400, reason: Bad Request, body: {'message': 'argument repository: repository id: invalid value: validation error'}
Lakefs should return the same body when running the code you provided as well.
cc @N-o-Z
@yonipeleg33 that was just a placeholder value, not the real name (which would leak private internal info). The real name did not have <>
in it.
However, I will retest, as this may have been fixed since I reported it.
What happened?
What actually happened, including error codes if applies.
Steps to Reproduce:
throws:
Expected behavior
I would expect an exception to not be thrown, but instead return
False
(ie that the object does not exist)lakeFS version
1.9.1
How lakeFS is installed
Kubernetes
Affected clients
Python lakefs client 0.3.0
Relevant log output
No response
Contact details
No response