From 30e65b250fbbbd278ab5af256e1135b9a89239ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6pf?= Date: Wed, 28 Dec 2022 22:41:39 +0100 Subject: [PATCH] remove old error_codes file --- backend/oasst_backend/error_codes.py | 36 ---------------------------- 1 file changed, 36 deletions(-) delete mode 100644 backend/oasst_backend/error_codes.py diff --git a/backend/oasst_backend/error_codes.py b/backend/oasst_backend/error_codes.py deleted file mode 100644 index 7f0bb541..00000000 --- a/backend/oasst_backend/error_codes.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -from enum import IntEnum - - -class OasstErrorCode(IntEnum): - """ - Error codes of the Open-Assistant backend API. - - Ranges: - 0-1000: general errors - 1000-2000: tasks endpoint - 2000-3000: prompt_repository - """ - - # 0-1000: general errors - GENERIC_ERROR = 0 - DATABASE_URI_NOT_SET = 1 - API_CLIENT_NOT_AUTHORIZED = 2 - - # 1000-2000: tasks endpoint - TASK_INVALID_REQUEST_TYPE = 1000 - TASK_ACK_FAILED = 1001 - TASK_INVALID_RESPONSE_TYPE = 1002 - TASK_INTERACTION_REQUEST_FAILED = 1003 - TASK_GENERATION_FAILED = 1004 - - # 2000-3000: prompt_repository - INVALID_POST_ID = 2000 - POST_NOT_FOUND = 2001 - RATING_OUT_OF_RANGE = 2002 - INVALID_RANKING_VALUE = 2003 - WORK_PACKAGE_NOT_FOUND = 2004 - WORK_PACKAGE_EXPIRED = 2005 - WORK_PACKAGE_PAYLOAD_TYPE_MISMATCH = 2006 - INVALID_TASK_TYPE = 2007 - USER_NOT_SPECIFIED = 2008