-
Notifications
You must be signed in to change notification settings - Fork 27
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
[v7] Fix exceptions not being raised together as CogniteMultiException
#1456
Conversation
Codecov Report
@@ Coverage Diff @@
## v7-release #1456 +/- ##
=============================================
Coverage ? 91.80%
=============================================
Files ? 121
Lines ? 15182
Branches ? 0
=============================================
Hits ? 13938
Misses ? 1244
Partials ? 0 |
CogniteMultiException
CogniteMultiException
7572e20
to
025b6f2
Compare
025b6f2
to
776ea55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the work is already done by have the raise_compound_exception_if_failed_tasks
?
@@ -236,7 +236,7 @@ def __str__(self) -> str: | |||
return msg | |||
|
|||
|
|||
class CogniteImportError(CogniteException): | |||
class CogniteImportError(CogniteException, ImportError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Yes 🤩 I have no idea why someone started raising the first reception 🤷 My guess is that it was an error - and lots of people then copied it... |
2473a1f
to
db9b1a1
Compare
Description
Fixes one of the oldest issues: #578
With this change,
client.time_series.data.retrieve_latest(id=123)
, assuming this id doesn't randomly exist, now raisesCogniteNotFoundError
instead ofCogniteAPIError
.