JupyterWebSocketError#

exception rubin.nublado.client.JupyterWebSocketError(msg, *, user, code=None, reason=None, status=None, body=None, annotations=None, started_at=None, failed_at=None)#

Bases: NubladoClientSlackException

An error occurred talking to the Jupyter lab WebSocket.

Parameters:
classmethod from_exception(exc, user, annotations=None, started_at=None, failed_at=None)#

Convert from a WebSocketException.

Parameters:
  • exc (WebSocketException) – Underlying exception.

  • user (str) – User the code is running as.

  • annotations (dict[str, str] | None, default: None) – Additional annotations for the exception.

  • started_at (datetime | None, default: None) – When the operation started.

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

Returns:

Newly-created exception.

Return type:

JupyterWebSocketError

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