Can’t distinguish programmatically between snapcraft.yaml errors and other errors

Bug #1666160 reported by Matthew Paul Thomas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Apologies for the incomplete bug report.

snapcraft may return an error because of a problem with the snapcraft.yaml (for example bug 1578024), or it may fail for other reasons (for example bug 1624019)

Evan says that currently, there is not a programmatic distinction (such as an error code) between these two kinds of error. This would be helpful in build.snapcraft.io, so that snapcraft.yaml-specific errors can be attached to the snapcraft.yaml UI.

Revision history for this message
Cris Dywan (kalikiana) wrote :

Perhaps different error codes depending on the exception would be the obvious option.

Or the proposed "snapcraft lint" could be used to check validity in a preliminary step.

Revision history for this message
Cris Dywan (kalikiana) wrote :

This can actually be implemented now by adding get_exit_code to error subclasses in snapcraft/internal/errors.py

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.