mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-10 23:32:55 +00:00
chore: optimize status code (#235)
This commit is contained in:
@@ -6,45 +6,46 @@ pub enum StatusCode {
|
||||
// ====== Begin of common status code ==============
|
||||
/// Success.
|
||||
Success = 0,
|
||||
|
||||
/// Unknown error.
|
||||
Unknown = 1,
|
||||
Unknown = 1000,
|
||||
/// Unsupported operation.
|
||||
Unsupported = 2,
|
||||
Unsupported = 1001,
|
||||
/// Unexpected error, maybe there is a BUG.
|
||||
Unexpected = 3,
|
||||
Unexpected = 1002,
|
||||
/// Internal server error.
|
||||
Internal = 4,
|
||||
Internal = 1003,
|
||||
/// Invalid arguments.
|
||||
InvalidArguments = 5,
|
||||
InvalidArguments = 1004,
|
||||
// ====== End of common status code ================
|
||||
|
||||
// ====== Begin of SQL related status code =========
|
||||
/// SQL Syntax error.
|
||||
InvalidSyntax = 6,
|
||||
InvalidSyntax = 2000,
|
||||
// ====== End of SQL related status code ===========
|
||||
|
||||
// ====== Begin of query related status code =======
|
||||
/// Fail to create a plan for the query.
|
||||
PlanQuery = 7,
|
||||
PlanQuery = 3000,
|
||||
/// The query engine fail to execute query.
|
||||
EngineExecuteQuery = 8,
|
||||
EngineExecuteQuery = 3001,
|
||||
// ====== End of query related status code =========
|
||||
|
||||
// ====== Begin of catalog related status code =====
|
||||
/// Table already exists.
|
||||
TableAlreadyExists = 9,
|
||||
TableNotFound = 10,
|
||||
TableColumnNotFound = 11,
|
||||
TableAlreadyExists = 4000,
|
||||
TableNotFound = 4001,
|
||||
TableColumnNotFound = 4002,
|
||||
// ====== End of catalog related status code =======
|
||||
|
||||
// ====== Begin of storage related status code =====
|
||||
/// Storage is temporarily unable to handle the request
|
||||
StorageUnavailable = 12,
|
||||
StorageUnavailable = 5000,
|
||||
// ====== End of storage related status code =======
|
||||
|
||||
// ====== Begin of server related status code =====
|
||||
/// Runtime resources exhausted, like creating threads failed.
|
||||
RuntimeResourcesExhausted = 13,
|
||||
RuntimeResourcesExhausted = 6000,
|
||||
// ====== End of server related status code =======
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user