Skip to content

Entity matching retrieve endpoint does not return None #1593

@KristianVangsnes

Description

@KristianVangsnes

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.

def retrieve(self, id: int | None = None, external_id: str | None = None) -> EntityMatchingModel | None:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions