NubladoError#

exception rubin.nublado.client.NubladoError(message, user=None, *, context=None, failed_at=None, started_at=None)#

Bases: SlackException

A Nublado client error.

This adds some additional fields to SlackException but is otherwise equivalent. It is intended to be subclassed. Subclasses must override the to_slack and to_sentry methods.

Parameters:
  • message (str) – Exception message.

  • user (str | None, default: None) – User Nublado client was acting on behalf of.

  • context (CodeContext | None, default: None) – The code context for this operation, if any.

  • failed_at (datetime | None, default: None) – When the operation failed. Omit to use the current time.

  • started_at (datetime | None, default: None) – When the operation that failed began.

context#

The code context for this operation, if any.

failed_at#

When the operation failed.

started_at#

When the operation that ended in an exception started.

user#

User Nublado client was acting on behalf of.

to_sentry()#

Return an object with tags and contexts to add to Sentry events.

Returns:

Annotated Sentry object.

Return type:

SentryEventInfo

to_slack()#

Format the error as a Slack Block Kit message.

Returns:

Formatted Slack message.

Return type:

SlackMessage