cognitedata / cognite-sdk-python

Cognite Python SDK
https://cognite-sdk-python.readthedocs-hosted.com/
Apache License 2.0
79 stars 27 forks source link

handle 401 better by raising `CogniteProjectAccessError` #2026

Closed haakonvt closed 1 week ago

haakonvt commented 2 weeks ago

https://cognitedata.slack.com/archives/CG10VQPFX/p1731598325093499 https://cognitedata.atlassian.net/browse/DM-2351

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.43%. Comparing base (733200e) to head (8408b28). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2026 +/- ## ========================================== - Coverage 90.44% 90.43% -0.02% ========================================== Files 139 139 Lines 22239 22267 +28 ========================================== + Hits 20114 20137 +23 - Misses 2125 2130 +5 ``` | [Files with missing lines](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata) | Coverage Δ | | |---|---|---| | [cognite/client/\_api/files.py](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026?src=pr&el=tree&filepath=cognite%2Fclient%2F_api%2Ffiles.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata#diff-Y29nbml0ZS9jbGllbnQvX2FwaS9maWxlcy5weQ==) | `90.15% <100.00%> (ø)` | | | [cognite/client/\_api\_client.py](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026?src=pr&el=tree&filepath=cognite%2Fclient%2F_api_client.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata#diff-Y29nbml0ZS9jbGllbnQvX2FwaV9jbGllbnQucHk=) | `90.18% <100.00%> (+0.06%)` | :arrow_up: | | [cognite/client/\_http\_client.py](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026?src=pr&el=tree&filepath=cognite%2Fclient%2F_http_client.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata#diff-Y29nbml0ZS9jbGllbnQvX2h0dHBfY2xpZW50LnB5) | `96.69% <100.00%> (ø)` | | | [cognite/client/\_version.py](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026?src=pr&el=tree&filepath=cognite%2Fclient%2F_version.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata#diff-Y29nbml0ZS9jbGllbnQvX3ZlcnNpb24ucHk=) | `100.00% <100.00%> (ø)` | | | [cognite/client/exceptions.py](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026?src=pr&el=tree&filepath=cognite%2Fclient%2Fexceptions.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata#diff-Y29nbml0ZS9jbGllbnQvZXhjZXB0aW9ucy5weQ==) | `90.80% <100.00%> (+1.47%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/cognitedata/cognite-sdk-python/pull/2026/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cognitedata)