#[non_exhaustive]pub enum ApiErrorCode {
Show 24 variants
BadRequest,
Unauthenticated,
Forbidden,
InsufficientScope,
NotFound,
MethodNotAllowed,
Conflict,
ValidationFailed,
RateLimited,
InvalidApiVersion,
ApiVersionRetired,
ApiVersionBrownout,
EndpointUnavailableForVersion,
InvalidInclude,
InvalidFieldset,
InvalidFilter,
InvalidSort,
InvalidPage,
InvalidIdempotencyKey,
IdempotencyKeyMismatch,
IdempotencyInProgress,
HttpError,
ServerError,
ServiceUnavailable,
}Expand description
The error codes Fusion Stack itself sends. Their statuses and titles come from the shared error table, so both server packages send the same ones.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BadRequest
bad_request
Unauthenticated
unauthenticated
Forbidden
forbidden
InsufficientScope
insufficient_scope
NotFound
not_found
MethodNotAllowed
method_not_allowed
Conflict
conflict
ValidationFailed
validation_failed
RateLimited
rate_limited
InvalidApiVersion
invalid_api_version
ApiVersionRetired
api_version_retired
ApiVersionBrownout
api_version_brownout
endpoint_unavailable_for_version
InvalidInclude
invalid_include
InvalidFieldset
invalid_fieldset
InvalidFilter
invalid_filter
InvalidSort
invalid_sort
InvalidPage
invalid_page
InvalidIdempotencyKey
invalid_idempotency_key
IdempotencyKeyMismatch
idempotency_key_mismatch
IdempotencyInProgress
idempotency_in_progress
HttpError
http_error
ServerError
server_error
service_unavailable
Implementations§
Source§impl ApiErrorCode
impl ApiErrorCode
Source§impl ApiErrorCode
impl ApiErrorCode
Sourcepub fn for_status(status: u16) -> Self
pub fn for_status(status: u16) -> Self
The code for an HTTP error status that has no more specific code.
Trait Implementations§
Source§impl Clone for ApiErrorCode
impl Clone for ApiErrorCode
impl Copy for ApiErrorCode
Source§impl Debug for ApiErrorCode
impl Debug for ApiErrorCode
Source§impl Display for ApiErrorCode
impl Display for ApiErrorCode
impl Eq for ApiErrorCode
Source§impl ErrorCode for ApiErrorCode
impl ErrorCode for ApiErrorCode
Source§impl Hash for ApiErrorCode
impl Hash for ApiErrorCode
Source§impl PartialEq for ApiErrorCode
impl PartialEq for ApiErrorCode
impl StructuralPartialEq for ApiErrorCode
Auto Trait Implementations§
impl Forget for ApiErrorCode
impl Freeze for ApiErrorCode
impl Move for ApiErrorCode
impl RefUnwindSafe for ApiErrorCode
impl Send for ApiErrorCode
impl Sync for ApiErrorCode
impl Unpin for ApiErrorCode
impl UnsafeUnpin for ApiErrorCode
impl UnwindSafe for ApiErrorCode
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> ExpectedError for Twhere
T: ErrorCode,
impl<T> ExpectedError for Twhere
T: ErrorCode,
Source§fn expected_code(&self) -> String
fn expected_code(&self) -> String
The code, such as
not_found.Source§fn expected_status(&self) -> Option<u16>
fn expected_status(&self) -> Option<u16>
The status the response must have, if any.