Skip to content
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

Do we need a new (Metadata)TypeError? #1779

Closed
MVrachev opened this issue Jan 18, 2022 · 1 comment
Closed

Do we need a new (Metadata)TypeError? #1779

MVrachev opened this issue Jan 18, 2022 · 1 comment
Labels
discussion Discussions related to the design, implementation and operation of the project

Comments

@MVrachev
Copy link
Collaborator

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 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.

For context see comments: #1725 (comment), #1725 (comment), and #1725 (comment)

@MVrachev MVrachev added the discussion Discussions related to the design, implementation and operation of the project label Jan 18, 2022
@lukpueh
Copy link
Member

lukpueh commented Jan 27, 2022

I reviewed all exceptions and I no longer think we currently need to add a custom (Metadata)TypeError. Shall we close here?

@jku jku closed this as completed Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussions related to the design, implementation and operation of the project
Projects
None yet
Development

No branches or pull requests

3 participants