Files
dify/api/controllers/console/human_input_v2/errors.py
T
8cbb6c0130 feat: HITL IM integration (#44864)
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-30 02:43:31 +00:00

33 lines
956 B
Python

from http import HTTPStatus
from libs.exception import BaseHTTPException
class ChannelAlreadyConfiguredHttpError(BaseHTTPException):
error_code = "conflict"
description = "A Channel is already configured for this kind."
code = HTTPStatus.CONFLICT
class ChannelNotFoundHttpError(BaseHTTPException):
error_code = "not_found"
description = "Channel not found."
code = HTTPStatus.NOT_FOUND
class ChannelProviderConfigurationUpdatedHttpError(BaseHTTPException):
error_code = "provider_configuration_updated"
description = "The Channel configuration was updated."
code = HTTPStatus.CONFLICT
class ChannelProviderBadRequestHttpError(BaseHTTPException):
error_code = "bad_request"
code = HTTPStatus.BAD_REQUEST
class ChannelReplacementRequiredHttpError(BaseHTTPException):
error_code = "replacement_required"
description = "Explicit IM Channel replacement is required."
code = HTTPStatus.CONFLICT