pub enum StatusCode {
Show 37 variants
Success = 0,
Unknown = 1_000,
Unsupported = 1_001,
Unexpected = 1_002,
Internal = 1_003,
InvalidArguments = 1_004,
Cancelled = 1_005,
IllegalState = 1_006,
External = 1_007,
InvalidSyntax = 2_000,
PlanQuery = 3_000,
EngineExecuteQuery = 3_001,
TableAlreadyExists = 4_000,
TableNotFound = 4_001,
TableColumnNotFound = 4_002,
TableColumnExists = 4_003,
DatabaseNotFound = 4_004,
RegionNotFound = 4_005,
RegionAlreadyExists = 4_006,
RegionReadonly = 4_007,
RegionNotReady = 4_008,
RegionBusy = 4_009,
TableUnavailable = 4_010,
DatabaseAlreadyExists = 4_011,
StorageUnavailable = 5_000,
RequestOutdated = 5_001,
RuntimeResourcesExhausted = 6_000,
RateLimited = 6_001,
UserNotFound = 7_000,
UnsupportedPasswordType = 7_001,
UserPasswordMismatch = 7_002,
AuthHeaderNotFound = 7_003,
InvalidAuthHeader = 7_004,
AccessDenied = 7_005,
PermissionDenied = 7_006,
FlowAlreadyExists = 8_000,
FlowNotFound = 8_001,
}
Expand description
Common status code for public API.
Variants§
Success = 0
Success.
Unknown = 1_000
Unknown error.
Unsupported = 1_001
Unsupported operation.
Unexpected = 1_002
Unexpected error, maybe there is a BUG.
Internal = 1_003
Internal server error.
InvalidArguments = 1_004
Invalid arguments.
Cancelled = 1_005
The task is cancelled.
IllegalState = 1_006
Illegal state, can be exposed to users.
External = 1_007
Caused by some error originated from external system.
InvalidSyntax = 2_000
SQL Syntax error.
PlanQuery = 3_000
Fail to create a plan for the query.
EngineExecuteQuery = 3_001
The query engine fail to execute query.
TableAlreadyExists = 4_000
Table already exists.
TableNotFound = 4_001
Table not found.
TableColumnNotFound = 4_002
Table column not found.
TableColumnExists = 4_003
Table column already exists.
DatabaseNotFound = 4_004
Database not found.
RegionNotFound = 4_005
Region not found.
RegionAlreadyExists = 4_006
Region already exists.
RegionReadonly = 4_007
Region is read-only in current state.
RegionNotReady = 4_008
Region is not in a proper state to handle specific request.
RegionBusy = 4_009
Region is temporarily in busy state.
Table is temporarily unable to handle the request.
DatabaseAlreadyExists = 4_011
Database already exists.
Storage is temporarily unable to handle the request.
RequestOutdated = 5_001
Request is outdated, e.g., version mismatch.
RuntimeResourcesExhausted = 6_000
Runtime resources exhausted, like creating threads failed.
RateLimited = 6_001
Rate limit exceeded.
UserNotFound = 7_000
User not exist.
UnsupportedPasswordType = 7_001
Unsupported password type.
UserPasswordMismatch = 7_002
Username and password does not match.
AuthHeaderNotFound = 7_003
Not found http authorization header.
InvalidAuthHeader = 7_004
Invalid http authorization header.
AccessDenied = 7_005
Illegal request to connect catalog-schema.
PermissionDenied = 7_006
User is not authorized to perform the operation.
FlowAlreadyExists = 8_000
FlowNotFound = 8_001
Implementations§
source§impl StatusCode
impl StatusCode
source§impl StatusCode
impl StatusCode
sourcepub fn is_success(code: u32) -> bool
pub fn is_success(code: u32) -> bool
Returns true
if code
is success.
sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true
if the error with this code is retryable.
sourcepub fn should_log_error(&self) -> bool
pub fn should_log_error(&self) -> bool
Returns true
if we should print an error log for an error with
this status code.
pub fn from_u32(value: u32) -> Option<Self>
Trait Implementations§
source§impl AsRef<str> for StatusCode
impl AsRef<str> for StatusCode
source§impl Clone for StatusCode
impl Clone for StatusCode
source§fn clone(&self) -> StatusCode
fn clone(&self) -> StatusCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StatusCode
impl Debug for StatusCode
source§impl Display for StatusCode
impl Display for StatusCode
source§impl FromStr for StatusCode
impl FromStr for StatusCode
source§impl IntoEnumIterator for StatusCode
impl IntoEnumIterator for StatusCode
type Iterator = StatusCodeIter
fn iter() -> StatusCodeIter ⓘ
source§impl PartialEq for StatusCode
impl PartialEq for StatusCode
source§impl TryFrom<&str> for StatusCode
impl TryFrom<&str> for StatusCode
impl Copy for StatusCode
impl Eq for StatusCode
impl StructuralPartialEq for StatusCode
Auto Trait Implementations§
impl Freeze for StatusCode
impl RefUnwindSafe for StatusCode
impl Send for StatusCode
impl Sync for StatusCode
impl Unpin for StatusCode
impl UnwindSafe for StatusCode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request