DuplicateObjectError

exception controller.exceptions.DuplicateObjectError(message, *, user=None, kind, namespace=None)

Bases: SlackException

Multiple Kubernetes objects were found when one was expected.

Parameters:
  • message (str) – Summary of error.

  • user (str | None, default: None) – Username on whose behalf the request is being made.

  • kind (str) – Kind of Kubernetes object that was duplicated.

  • namespace (str | None, default: None) – Namespace of object being acted on.

to_slack()

Convert to a Slack message for Slack alerting.

Returns:

Slack message suitable for posting as an alert.

Return type:

safir.slack.blockkit.SlackMessage