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

More descriptive error messages on object has no attribute error #51

Open
runborg opened this issue Mar 16, 2024 · 0 comments
Open

More descriptive error messages on object has no attribute error #51

runborg opened this issue Mar 16, 2024 · 0 comments

Comments

@runborg
Copy link
Collaborator

runborg commented Mar 16, 2024

When the client requests an attribute that does not exist in the current case object it will fail with an error like this:

Traceback (most recent call last):
  File "/home/runarb/.local/pipx/venvs/curitz/lib/python3.10/site-packages/curitz/cli.py", line 565, in create_case_list
    port = case.bfdaddr
  File "/home/runarb/.local/pipx/venvs/curitz/lib/python3.10/site-packages/zinolib/ritz.py", line 309, in __getattr__
    self.__getattribute__(name)
AttributeError: 'Case' object has no attribute 'bfdaddr'

This AttributeError does not include any hints on the Case number in action when this error occurred.
It would be nice to somehow add the case ID to the error, this to lessen the burden of debugging this case in the backend system.
without available case id all cases needs to be inspected to find the affected case object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant