NubladoWebError#
- exception rubin.nublado.client.NubladoWebError(message, user=None, *, body=None, context=None, failed_at=None, method=None, started_at=None, status=None, url=None)#
Bases:
SlackWebException,NubladoErrorRepresents an exception that can be reported to Slack.
Similar to
NubladoError, this adds some additional fields toSlackWebExceptionbut is otherwise equivalent. It is intended to be subclassed. Subclasses may want to override theto_slackandto_sentrymethods.- Parameters:
message (
str) – Exception string value, which is the default Slack message.user (
str|None, default:None) – Username on whose behalf the request is being made.body (
str|None, default:None) – Body of failure message, 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.status (
int|None, default:None) – Status code of failure, if any.
- message#
Exception string value, which is the default Slack message.
- body#
Body of failure message, if any.
- context#
The code context for this operation, if any.
- failed_at#
When the exception happened. Omit to use the current time.
- method#
Method of request.
- started_at#
When the operation that failed began.
- status#
Status code of failure, if any.
- url#
URL of the request.
- user#
Username on whose behalf the request is being made.
- to_sentry()#
Format the error as a Slack Block Kit message.
- Returns:
Formatted Slack message.
- Return type:
- to_slack()#
Return an object with tags and contexts to add to Sentry events.
- Returns:
Annotated Sentry object.
- Return type: