OpenMined / PyDP

The Python Differential Privacy Library. Built on top of: https://github.com/google/differential-privacy
Apache License 2.0
497 stars 136 forks source link

Raise different errors based on the error code returned from the DP Library #413

Open dibakch opened 2 years ago

dibakch commented 2 years ago

Description

In the builder of algorithms or numerical mechanisms, the DP Library returns different error types, i.e., invalid argument, unimplemented, failed precondition, or internal errors. Based on those types, we should raise different exceptions in Python, too.

Are you interested in working on this improvement yourself?

Additional Context

We would basically need to add a case statement based on the error code of the absl::StatusOr in the bindings.