Spaces:
Runtime error
Runtime error
| from fastapi import HTTPException | |
| class FeedbackNotFoundException(HTTPException): | |
| def __init__(self, feedback_id: int): | |
| super().__init__(status_code=404, detail=f"Отзыв id={feedback_id} не найден") | |
| class LLMResponseException(HTTPException): | |
| def __init__(self, detail: str = "Не удалось получить ответ LLM"): | |
| super().__init__(status_code=400, detail=detail) | |
| class LogNotFoundException(HTTPException): | |
| def __init__(self, log_id: int): | |
| super().__init__(status_code=404, detail=f"Лог id={log_id} не найден") | |
| class InvalidUserScoreException(HTTPException): | |
| def __init__(self, userScore: int): | |
| super().__init__(status_code=400, detail=f"Невалидная оценка {userScore} ответа LLM") | |
| class InvalidEstimateException(HTTPException): | |
| def __init__(self, estimate_value: int): | |
| super().__init__(status_code=400, detail=f"Невалидная оценка {estimate_value} времени") | |