# Copyright (c) 2020 CloudZero - ALL RIGHTS RESERVED - PROPRIETARY AND CONFIDENTIAL
# Unauthorized copying of this file and/or project, via any medium is strictly prohibited.
# Direct all questions to legal@cloudzero.com


class HTTPResponseException(Exception):
    """Exception for passing special response body to http_response decorator. The given
    `body` will be json serialized before returning it.  Can also provide an optional HTTP status
    code (default: 500)"""

    def __init__(self, body, statusCode=500):
        self.body = body
        self.statusCode = statusCode


class NamespaceMissingException(Exception):
    """Thrown when a namespace parameter is not provided or unavailable"""


class AlreadyTrackingExecutionException(Exception):
    pass


class CannotFindLogGroupException(Exception):
    pass


class StepFunctionsNotFoundException(Exception):
    pass


class CloudWatchQueryException(Exception):
    status: str

    def __init__(self, status) -> None:
        super().__init__(f'Query did not succeed: Status = {status}')
        self.status = status


class ValuesHasMultipleDispatchesError(Exception):
    pass


class InvalidValueError(Exception):
    pass
