From bdd5bfea0b630b9134945452601a7c8e68a9d935 Mon Sep 17 00:00:00 2001 From: SwarzChen Date: Fri, 1 Apr 2022 16:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20[main]=20clean=20error=20constan?= =?UTF-8?q?ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/error.go | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/constants/error.go b/constants/error.go index 4a0cfaf..f30139b 100644 --- a/constants/error.go +++ b/constants/error.go @@ -27,24 +27,6 @@ var DATABASE_CONNETION_ERROR = &ErrorEntity{ ErrorCode: "DATABASE_CONNETION_ERROR", } -var SQL_WRAPPING_ERROR = &ErrorEntity{ - StatusCode: http.StatusInternalServerError, - ErrorCode: "SQL_WRAPPING_ERROR", -} - -var SCHEMA_PREPARATION_FAIL_ERROR = &ErrorEntity{ - StatusCode: http.StatusInternalServerError, - ErrorCode: "SCHEMA_PREPARATION_FAIL_ERROR", -} - -var TABLE_CREATION_ERROR = &ErrorEntity{ - StatusCode: http.StatusInternalServerError, - ErrorCode: "TABLE_CREATION_ERROR", -} -var POSTGRESQL_ROW_SCANNING_ERROR = &ErrorEntity{ - StatusCode: http.StatusInternalServerError, - ErrorCode: "POSTGRESQL_ROW_SCANNING_ERROR", -} var REDIS_INSERTION_ERROR = &ErrorEntity{ StatusCode: http.StatusInternalServerError, ErrorCode: "REDIS_INSERTION_ERROR", @@ -61,6 +43,18 @@ var POSTGRESQL_INSERTION_ERROR = &ErrorEntity{ StatusCode: http.StatusInternalServerError, ErrorCode: "POSTGRESQL_INSERTION_ERROR", } +var POSTGRESQL_QUERY_ERROR = &ErrorEntity{ + StatusCode: http.StatusInternalServerError, + ErrorCode: "POSTGRESQL_QUERY_ERROR", +} +var SETTING_GENERATOR_SEED_ERROR = &ErrorEntity{ + StatusCode: http.StatusInternalServerError, + ErrorCode: "SETTING_GENERATOR_SEED_ERROR", +} +var ID_GENERATION_ERROR = &ErrorEntity{ + StatusCode: http.StatusInternalServerError, + ErrorCode: "ID_GENERATION_ERROR", +} // STATUS_NOT_FOUND var URL_ID_MISSING_ERROR = &ErrorEntity{