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

Improve exception hierarchy #967

Closed
trishankatdatadog opened this issue Dec 16, 2019 · 2 comments
Closed

Improve exception hierarchy #967

trishankatdatadog opened this issue Dec 16, 2019 · 2 comments
Assignees

Comments

@trishankatdatadog
Copy link
Member

Description of issue or feature request:

Improve the exception hierarchy in TUF.

Current behavior:

Right now, every exception in TUF is a NoWorkingMirrorError(), which makes for very misleading error messages, to say the least, especially for front-end users.

Expected behavior:

Every exception should say exactly what the real error was.

@lukpueh
Copy link
Member

lukpueh commented Apr 15, 2020

Slightly related bad error message: lukpueh@e3e39cf

@jku
Copy link
Member

jku commented Feb 16, 2022

I think we are far better about it now:

  • there are fewer errors: only ones that we handle or that we actually expect clients (or future repository tools) to handle

  • there is a hierarchy:

    • The different RepositoryErrors are useful but for a client they all mean "something is wrong on the repository side metadata and the issue is something we can't fix: A refresh later may help"
    • There are multiple DownloadErrors which for a client are all the same: "something goes wrong during download. trying again later might work"

    Closing, please open a new one if there are still issues

@jku jku closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants