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

Decide how to handle exceptions raised by services consumed by the PURLCLI commands #449

Open
johnmhoran opened this issue May 30, 2024 · 1 comment
Assignees

Comments

@johnmhoran
Copy link
Member

johnmhoran commented May 30, 2024

In the absence of design feedback, I decided months ago that we do not want an exception to be raised when a PURLCLI command is run -- this would interrupt the process and is not desirable, I concluded. In place of that I added code to use a .log file shared by purldb and fetchcode/package.py that would be used to communicate exception messages back to purldb-toolkit, where they could be reported in the JSON errors and warnings keys. (We also need to include packageurl-python/purl2url.py in this communication line.)

I learned a short while ago that we do not want this approach and that we do want to raise exceptions. We need to discuss the implementation details before I start to revise the extensive code created to implement the logging approach.

@johnmhoran
Copy link
Member Author

See also my 2024-03-05 fetchcode issue discussing several examples of exceptions that interrupt the flow of the relevant PURLCLI command and my approach -- logging, reporting in the output errors and warnings keys, and printing to the console -- to replace the interruptions from a raised exception.

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

3 participants