from utils.exceptions import NotFound, JsonValidationError, BadRequest class PhaseNotFound(NotFound): detail = "Phase doesn't exist." code = "phase_not_found" class PhaseOrderError(JsonValidationError): detail = "Phase order should be between 0 and last order + 1" code = "invalid_phase_order" class SinglePhaseDeletionError(BadRequest): detail = "Single phase in project can't be deleted" code = "single_phase_deletion_error" class SingleCampaignInPhaseDeletionError(BadRequest): detail = "Single campaign in phase can't be deleted" code = "single_campaign_in_phase_deletion_error" class CampaignsForReviewNotFound(NotFound): detail = "Not found campaigns for review" code = "not_found_campaigns_for_review" class NoApprovalRequestForCampaign(BadRequest): detail = "No approval request for campaign" code = "no_approval_request_for_campaign" class LastMediaPlanDeletionError(BadRequest): detail = "Last media plan in the project can't be deleted" code = "last_media_plan_deletion_error"