From a6c1e1497798d6cbe742af2e0c793d0b21ff84ce Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 21 Jan 2022 17:00:06 +0900 Subject: [PATCH] Remove unused exceptions --- backend/api/exceptions.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/backend/api/exceptions.py b/backend/api/exceptions.py index 5c89ebb0..353d00c7 100644 --- a/backend/api/exceptions.py +++ b/backend/api/exceptions.py @@ -2,16 +2,6 @@ from rest_framework import status from rest_framework.exceptions import APIException -class FileParseException(APIException): - status_code = status.HTTP_400_BAD_REQUEST - default_detail = 'Invalid file format, line {}: {}' - default_code = 'invalid' - - def __init__(self, line_num, line, code=None): - detail = self.default_detail.format(line_num, line) - super().__init__(detail, code) - - class LabelValidationError(APIException): status_code = status.HTTP_400_BAD_REQUEST default_detail = 'You cannot create a label with same name or shortcut key.' @@ -20,8 +10,3 @@ class LabelValidationError(APIException): class AnnotationRelationValidationError(APIException): status_code = status.HTTP_400_BAD_REQUEST default_detail = 'You cannot create an annotation relation between the same annotation.' - - -class RelationTypesValidationError(APIException): - status_code = status.HTTP_400_BAD_REQUEST - default_detail = 'You cannot create a relation type with same name or color.'