GafaelfawrValidationError#
- exception rubin.gafaelfawr.GafaelfawrValidationError(message, error)#
Bases:
GafaelfawrErrorGafaelfawr response did not validate against the expected model.
- classmethod from_exception(exc)#
Create an exception from a Pydantic parse failure.
- Parameters:
exc (
ValidationError) – Pydantic exception.- Returns:
Constructed exception.
- Return type:
- to_sentry()#
Return an object with tags and contexts to add to Sentry events.
This is the generic version that only adds the username as a tag. Child exceptions may want to override it to add more metadata.
- Return type:
- to_slack()#
Format the exception as a Slack message.
This is the generic version that only reports the text of the exception and the base fields. Child exceptions may want to override it to add more metadata.
- Returns:
Slack message suitable for posting with
safir.slack.webhook.SlackWebhookClient.- Return type:
SlackMessage