transition-zero / tz-client

A client repository for accessing FEO data programmatically.
https://docs.feo.transitionzero.org
Apache License 2.0
22 stars 4 forks source link

Make error codes clearer when searching for a node that doesn't exist #128

Open isabellasoldner opened 7 months ago

isabellasoldner commented 7 months ago

Feature Type

Problem Description

When searching for a node that doesn't exist the error message makes it seem like you've written the code wrongly. It would be good to catch this exception and print a more useful error message """ Europe = Node.search("EU") print(Europe) for child in Europe[0].children: print(child) """ gives Screenshot from 2024-03-11 16-07-13 Screenshot from 2024-03-11 16-06-59

Feature Description

try: grab node except RelevantException: logging.error("Cannot find a node with this name")