Skip to content

Commit

Permalink
🚨 [main] clean error constants
Browse files Browse the repository at this point in the history
  • Loading branch information
DenChenn committed Apr 1, 2022
1 parent e80e304 commit bdd5bfe
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions constants/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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{
Expand Down

0 comments on commit bdd5bfe

Please sign in to comment.