cognitedata / cognitedata/cognite-sdk-python
Entity matching retrieve endpoint does not return None
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 92
- Forks
- 38
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
System information (please complete the following information):
- OS: [14.1.2 (23B92)
- Python Version: Python/3.10.5
- SDK Version: Latest
Describe the bug
The client.entity_matching.retrieve endpoint raises an error if the model does not exist. It should return None.
To Reproduce
Runnable code reproducing the error.
from cognite.client import CogniteClient
client = CogniteClient()
client.entity_matching.retrieve(external_id = "1234")
#assuming that model with ex_id = "1234" does not exist.
Expected behavior
It should not raise an error, but return None.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cognite/client/_api/entity_matching.py at the retrieve endpoint referenced by the issue, and reproduce the request with a nonexistent external_id such as "1234". Done means the endpoint returns None instead of raising an error for a missing model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100