GafaelfawrParseError#

exception mobu.exceptions.GafaelfawrParseError(message, error, user=None)#

Bases: SlackException

Unable to parse the reply from Gafaelfawr.

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

  • error (str) – Detailed error message, possibly multi-line.

  • user (str | None, default: None) – Username of the user involved.

classmethod from_exception(exc, user=None)#

Create an exception from a Pydantic parse failure.

Parameters:
  • exc (ValidationError) – Pydantic exception.

  • user (str | None, default: None) – Username of the user involved.

Returns:

Constructed exception.

Return type:

GafaelfawrParseError

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:

SentryEventInfo