Skip to content

Remove BuilddBaseAlias string-match guard in handle_runtime_error #1086

Open

Description

@tonyandrewmeyer

craft_application/util/logging.py (lines ~115-133, introduced in #1082) catches
the bare ValueError("'X.YY' is not a valid BuilddBaseAlias") from craft-providers
by string-matching the message:

case ValueError() if "BuilddBaseAlias" in str(error):

This is a shallow guard. The proper fix is for craft-providers to raise a typed
error at the lookup site; once that lands, this match arm should be replaced by
a typed except clause (or removed if the upstream handler covers it).

Blocked by: canonical/craft-providers#969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions