Module slack_bolt.error

Bolt specific error types.

Classes

class BoltError (*args, **kwargs)

General class in a Bolt app

Expand source code
class BoltError(Exception):
    """General class in a Bolt app"""

Ancestors

  • builtins.Exception
  • builtins.BaseException

Subclasses

class BoltUnhandledRequestError (*, request: Union[ForwardRef('BoltRequest'), ForwardRef('AsyncBoltRequest')], current_response: Optional[ForwardRef('BoltResponse')], last_global_middleware_name: Optional[str] = None)

General class in a Bolt app

Expand source code
class BoltUnhandledRequestError(BoltError):
    request: "BoltRequest"  # type: ignore[name-defined]
    body: dict
    current_response: Optional["BoltResponse"]  # type: ignore[name-defined]
    last_global_middleware_name: Optional[str]

    def __init__(
        self,
        *,
        request: Union["BoltRequest", "AsyncBoltRequest"],  # type: ignore[name-defined]
        current_response: Optional["BoltResponse"],  # type: ignore[name-defined]
        last_global_middleware_name: Optional[str] = None,
    ):
        self.request = request
        self.body = request.body if request is not None else {}
        self.current_response = current_response
        self.last_global_middleware_name = last_global_middleware_name

    def __str__(self) -> str:
        return "unhandled request error"

Ancestors

  • BoltError
  • builtins.Exception
  • builtins.BaseException

Class variables

var body : dict
var current_response : Optional[BoltResponse]
var last_global_middleware_name : Optional[str]
var request : BoltRequest