You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to use a shortlist of exceptions that will be thrown from our APIs, so that our users can handle them easily.
On another hand that doesn't stop us from creating other more specific exceptions that derive from those main exceptions.
This allows us to easily test that specific errors were thrown when we expected them.
For example we are using BadVersionError and LengthOrHashMismatchError which derive from RepositoryError.
There is the possibility to add a new exception which can be called TypeError or MetadataTypeError.
It will replace RepositoryError which we threw inside the TrustedMetadataSet when the metadata types are not the ones we expect.
Description of issue or feature request:
We want to use a shortlist of exceptions that will be thrown from our APIs, so that our users can handle them easily.
On another hand that doesn't stop us from creating other more specific exceptions that derive from those main exceptions.
This allows us to easily test that specific errors were thrown when we expected them.
For example we are using
BadVersionError
andLengthOrHashMismatchError
which derive fromRepositoryError
.There is the possibility to add a new exception which can be called
TypeError
orMetadataTypeError
.It will replace
RepositoryError
which we threw inside the TrustedMetadataSet when the metadata types are not the ones we expect.For context see comments: #1725 (comment), #1725 (comment), and #1725 (comment)
The text was updated successfully, but these errors were encountered: