oncall-engine/engine/apps/mattermost/exceptions.py
Matias Bordese dcae98b02a
feat: add support for mattermost chatops (#5321)
Related to https://github.com/grafana/oncall/issues/96

---------

Co-authored-by: Ravishankar <ravishankar.gnanaprakasam@gmail.com>
2025-04-21 14:23:37 -03:00

21 lines
598 B
Python

class MattermostAPITokenInvalid(Exception):
pass
class MattermostAPIException(Exception):
def __init__(self, status, url, msg="", method="GET"):
self.url = url
self.status = status
self.method = method
self.msg = msg
def __str__(self) -> str:
return f"MattermostAPIException: status={self.status} url={self.url} method={self.method} error={self.msg}"
class MattermostEventTokenInvalid(Exception):
def __init__(self, msg=""):
self.msg = msg
def __str__(self):
return f"MattermostEventTokenInvalid message={self.msg}"