NubladoWebSocketError#

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

Bases: NubladoError

An error occurred talking to the Jupyter lab WebSocket.

Parameters:
  • message (str) – Exception string value, which is the default Slack message.

  • user (str) – Username on whose behalf the request is being made.

  • body (str | None, default: None) – Body of failure message, if any.

  • code (int | None, default: None) – WebSocket status code of failure, if any.

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

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

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

message#

Exception string value, which is the default Slack message.

user#

Username on whose behalf the request is being made.

body#

Body of failure message, if any.

code#

WebSocket status code of failure, if any.

context#

The code context for this operation, if any.

failed_at#

When the exception happened. Omit to use the current time.

started_at#

When the operation that failed began.

classmethod from_exception(exc, user)#

Convert from a WebSocketException.

Parameters:
Returns:

Newly-created exception.

Return type:

NubladoWebSocketError

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